Solving the error “insserv: warning: script ‘script’ missing LSB tags and overrides”

I noticed once the following error:

insserv: warning: script ‘MyScript.sh’ missing LSB tags and overrides

It appears because someone wrote the /etc/init.d/MyScript.sh script before writing the LSB tags first.

To fix this, I opened the script code in a text editor (in the editor nano Ctrl+X to exit, y/n to save or cancel changes):

sudo nano /etc/init.d/MyScript.sh

And added in the beginning:

### BEGIN INIT INFO
# Provides:          MyScript
# Required-Start:
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      1 0 6
# Short-Description: ...
# Description: ...
### END INIT INFO

See also:
Run application at startup in Ubuntu

Join the Conversation

1 Comment

Leave a Reply

  1. Exactly what I needed to know right now , after lot of failled process from upgrades & updates on Debian Jessie …
    Thanks a lot for reminding me to be really more careful on my new script buildings …
    All the best !