我创建一个启动bash脚本,当我得到了类似的错误:Debian的启动脚本将不会启动
The script is missing LSB tags
所以我去把一些LSB的标签,但它仍然不启动启动。如果我手动
# /etc/init.d/myscript
启动它,它是打算在同一文件夹(/etc/init.d/fcgiwrap.pl),以启动一个PERL脚本一个非常简单的脚本,脚本完美的作品。
#!/bin/bash
### BEGIN INIT INFO
# Provides: scriptname
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO
# Carry out specific functions when asked to by the system
touch /var/lock/fcgiwrap
case "$1" in
start)
echo "Starting script /etc/init.d/fcgiwrap.pl"
/etc/init.d/fcgiwrap.pl
;;
stop)
echo "You can't stop this service. Consider deleting it"
;;
*)
echo "Usage: /etc/init.d/blah {start}"
exit 1
;;
esac
exit 0
那么问题是什么?谁/运行脚本以使其“开始”? –
该脚本应该在启动时运行。 –