Noip2 missing LSB tags and overrides

You may have seen this error message if you were trying to get the NoIP Dynamic Update Client to run at system startup. The reason for this is because Ubuntu was converted to order the boot sequence using the LSB fields in the header of each init.d script.

The solution is quite simple and can be achieved by adding the ‘INIT INFO’ to the script by executing the following:

sudo nano /etc/init.d/noip2

And copying the following block of code to the existing script:

#!/bin/bash

### BEGIN INIT INFO
# Provides: noip
# Required-Start: $syslog
# Required-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: noip.com client service
# Description:
#
### END INIT INFO

So that the completed script looks like this:

#! /bin/sh ### BEGIN INIT INFO
# Provides: noip2
# Required-Start: $syslog
# Required-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: noip.com client service
#
## END INIT INFO

# . /lib/lsb/init-functions
case "$1" in
start)
echo "Starting noip2."
/usr/local/bin/noip2
;;
stop)
echo "Shutting down noip2."
killall noip2
#killproc /usr/local/bin/noip2
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac

exit 0

Give the script executable permissions and update the rc.d scripts by executing the following commands:

sudo chmod +x /etc/init.d/noip2

And:

sudo update-rc.d noip2 defaults && sudo reboot

The latter command will update the defaults and reboot the server. Once the server has booted up again, you can check that the service is running by running the following:

$ sudo noip2 -S

The script should now run correctly. Enjoy!