0

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 <[email protected]>
# corrected 1-17-2004 by Alex Docauer <[email protected]>

# . /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?

2 Answers 2

4

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

3
  • 3
    That answer would be helpful, if it named the place, format, type, extension, whatever of the file which is above supposed to be. Where the heck does this go? For the rc.d scripts, people know. If they are to improve, please let them know how. Like, giving a canonical link to what this is, how it is defined, and where the files go.
    – foo
    Jul 30, 2018 at 17:20
  • The further reading and the hyperlinked instances where this has already been done all give that. It's usually a good idea to read the further reading.
    – JdeBP
    Aug 17, 2018 at 13:44
  • 1
    This is close to a link-only answer. At least the links are domain-internal, meaning they are probably not going 404 anytime soon.
    – oligofren
    Aug 26, 2020 at 14:21
3

First, you need to create a systemd startup script:

debian.noip2.service

And place it into /etc/systemd/system/ directory.

One example of such systemd startup script is the following:

[Unit]
After=network.target

[Service]
ExecStart=/usr/local/bin/debian.noip2.sh

[Install]
WantedBy=default.target

After: Instructs systemd on when the script should be run. In our case the script will run after network has started.

ExecStart: This field provides a full path the actual script to be execute.

WantedBy: Into what boot target the systemd unit should be installed

Configure and Install:

Open a terminal and run:

exec sudo -i
cp debian.noip2.sh /usr/local/bin/
chmod 744 /usr/local/bin/debian.noip2.sh
chmod 664 /etc/systemd/system/debian.noip2.service
systemctl daemon-reload
systemctl enable debian.noip2.service

Source

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .