Techie
Techie

Reputation: 45124

Missing LSB Information (Start-up Shell Script)

I created an auto start shell script. Then I have given permission to be executable.

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

update-rc.d command to set the run levels

sudo update-rc.d apimanager defaults 

I end up with below error

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

Upvotes: 10

Views: 21612

Answers (1)

Techie
Techie

Reputation: 45124

To get rid of the warning we have to add the corresponding script header as described here.

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

Upvotes: 31

Related Questions