缺lessLSB信息(启动Shell脚本)

我创build了一个自动启动shell脚本。 然后,我已经授予可执行的权限。

Add a link to /etc/inin.d/ : sudo ln -snf /opt/myapp/apimanager /etc/init.d/apimanager 

update-rc.d命令设置运行级别

 sudo update-rc.d apimanager defaults 

我结束了以下错误

 update-rc.d: warning: /etc/init.d/apimanager missing LSB information update-rc.d: see <http://wiki.debian.org/LSBInitScripts> Adding system startup for /etc/init.d/apimanager ... /etc/rc0.d/K20apimanager -> ../init.d/apimanager /etc/rc1.d/K20apimanager -> ../init.d/apimanager /etc/rc6.d/K20apimanager -> ../init.d/apimanager /etc/rc2.d/S20apimanager -> ../init.d/apimanager /etc/rc3.d/S20apimanager -> ../init.d/apimanager /etc/rc4.d/S20apimanager -> ../init.d/apimanager /etc/rc5.d/S20apimanager -> ../init.d/apimanager 

为了摆脱这个警告,我们必须添加相应的脚本头,如下所述。

 ### 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