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

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

| improve this answer | |
  • 2
    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 '18 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 '18 at 13:44
  • 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 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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.