/Etc/init.d से चलने पर यह त्रुटि करता है
sudo /etc/init.d/openconnect start
* Starting open connect xxx.somedomain.com openconnect
start-stop-daemon: unable to start /usr/local/bin/op_connect.sh (Exec format error)
...fail!
स्क्रिप्ट का निष्पादन सीधे ठीक काम करता है
स्क्रिप्ट / कंकाल / उदाहरण में 'कंकाल' उदाहरण की एक प्रति है (केवल नीचे का खंड बदला गया है)
#!/bin/sh
### BEGIN INIT INFO
# Provides: skeleton
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
### END INIT INFO
# Author: Foo Bar <foobar@baz.org>
#
# Please remove the "Author" lines above and replace them
# with your own name if you copy and modify this script.
# Do NOT "set -e"
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
DESC="open connect XXXXXXX"
NAME=op_connect.sh
DAEMON=/usr/local/bin/$NAME
DAEMON_ARGS="--options args"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Exit if
नीचे स्क्रिप्ट
#!/bin/sh
echo '<passwd>' | sudo openconnect --user=aname@somedomain.com --passwd-on-stdin https://xxxx.somedomain.com
file /usr/local/bin/op_connect.sh