Ubuntu – Why does update-rc.d not accept the init script

16.04init.dscriptsstartup

I want to start the noip.com dyndns client on bootup and am using the provided debian.noip2.sh script (which starts the client from the shell just fine). I copied it to /etc/init.d, made it owned by root and gave it 755 permissions. Now when I want to install it, I get:

# update-rc.d debian.noip2.sh defaults
insserv: warning: script 'K01debian.noip2.sh' missing LSB tags and overrides
insserv: warning: script 'debian.noip2.sh' missing LSB tags and overrides
insserv: warning: script 'noip' missing LSB tags and overrides
insserv: script virtualbox: service vboxdrv already provided!
insserv: script virtualbox: service virtualbox already provided!

the script looks like:

# cat /etc/init.d/debian.noip2.sh 
#! /bin/sh
# /etc/init.d/noip2.sh

# Supplied by no-ip.com
# Modified for Debian GNU/Linux by Eivind L. Rygge <eivind@rygge.org>
# corrected 1-17-2004 by Alex Docauer <alex@docauer.net>

# . /etc/rc.d/init.d/functions  # uncomment/modify for your killproc

DAEMON=/usr/local/bin/noip2
NAME=noip2

test -x $DAEMON || exit 0

case "$1" in
    start)
    echo -n "Starting dynamic address update: "
    start-stop-daemon --start --exec $DAEMON
    echo "noip2."
    ;;
    stop)
    echo -n "Shutting down dynamic address update:"
    start-stop-daemon --stop --oknodo --retry 30 --exec $DAEMON
    echo "noip2."
    ;;

    restart)
    echo -n "Restarting dynamic address update: "
    start-stop-daemon --stop --oknodo --retry 30 --exec $DAEMON
    start-stop-daemon --start --exec $DAEMON
    echo "noip2."
    ;;

    *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
esac
exit 0

How do I get this fixed?

Best Answer

How do I get this fixed?

Throw it away entirely. You don't need it in any form.

Then stop trying to use an rc system that has been twice superseded on Ubuntu, too. You don't need update-rc.d here, either.

It is now 2016, and the first rule for migrating to systemd applies. Someone has already done it. In this particular case, Michael Nikitochkin did it a year ago, amongst others (such as Jeroen Doggen, Efstathios Iosifidis, and some nameless people):

[Unit]
Description=NOIP Dynamic IP
Documentation=https://askubuntu.com/a/835318/43344

[Service]
ExecStart=/usr/local/bin/noip2

[Install]
WantedBy=multi-user.target

Further reading

Related Question