
(By default, systemd restarts a process at most 5 times within 10 seconds or so before giving up and leaving it in failed state.). Hence, systemd tried to restart it over and over to no avail. That’s why the init.d script and the systemd unit fails: They started noip2 just to see it immediately exits. when you start it, it creates another process that runs in background (so called forking) and the foreground process immediately returns ( exits). I suggest switching from your init.d script to a systemd unit: Create noip2 service for systemdĬreate the file /etc/systemd/system/rvice with the following content (and drop your init.d scripts): vi /etc/systemd/system/rvice Paste the following and save it. However, if you’re using Ubuntu 15.04 or above, the standard way to control background processes (and much, much more) is systemd. sudo service noip2 status Systemd or systemctl way Ideally, now you should be able to start the service with service command. sudo chmod +x sudo update-rc.d noip2.sh defaults etc/rc.d/init.d/functions # uncomment/modify for your killproc So, let’s create a service for it so that we can control it via service command. Fix permissions on files and then drop in an init.d script chmod 600 chown root:root /usr/local/etc/nf vi /etc/init.d/noip2.sh Paste the following in the file and save it # systemctl enable rviceįailed to enable unit: Unit file rvice does not exist. via systemctl). That means if you try the following commands, you get errors: systemctl status noip2 But the problem is if you reboot your server it won’t start automagically and also noip2 is not running as a service (i.e. Now at this point you can just run it and it will run like normal. Move configuration file to correct location: mv /tmp/nf /usr/local/etc/nf Run as Service or Init.d or Systemd New configuration file '/tmp/nf' created. Only one host is registered to this account.ĭo you wish to run something at successful update? (y/N) N
#DOWNLOAD NO IP DUC PASSWORD#
Please enter the login/email string for enter the password for user ****** usr/local/bin/noip2 -C -c /tmp/nfĪuto configuration for Linux client of. Noip2.c:1838:20: warning: variable ‘y’ set but not used Noip2.c:1826:13: warning: variable ‘x’ set but not used Noip2.c:1595:6: warning: variable ‘i’ set but not used Gcc -Wall -g -Dlinux -DPREFIX=\"/usr/local\" noip2.c -o noip2
#DOWNLOAD NO IP DUC INSTALL#
Install using the make command, this will use GCC to create the binaries and you will then be prompted to log in with your No-IP account username and password make install 08:25:22 (113 KB/s) - ‘’ saved Unzip it: tar xf Change directory to the folder: cd Install using make:
#DOWNLOAD NO IP DUC UPDATE#
apt install make gcc -y Change directory cd Download the noip2 Dynamic Update Client: wget Once we finish installing the binaries, then we can remove it as well. You can probably skip it if you already have them installed. SSH to your Linux server and sudo -s yourself to gain root access and install pre-requisites.



Now let’s get to it: Install pre-requisites If you’re familiar with it then you can skip parts to get to the right sections to either use init.d or systemd, so feel free. I know, I know I overdid it but it doesn’t hurt and now you will have multiple ways to control it. This post attempts to fix that problem by installing required packages to run the make command, install noip2 binary, fix file permissions if missing, create an init.d script for service command, create a systemd file so that we can control it via systemd and finally enable it via systemctl. But the instructions are lacking as if you reboot your server, it doesn’t work anymore because it doesn’t run on startup. Ideally noip2 Dynamic DNS Update Client should continually checks for IP address changes in the background and automatically updates the DNS at No-IP whenever it changes. For example, I use for my Dynamic DNS updates and I found that the instructions for installing noip2 Dynamic Update Client is lacking clarity and not fit for purpose in latest Ubuntu servers. Often I find instructions from different vendors that are too generic and doesn’t really work the way you want it to.
