Custom update script for No-IP
- Create an
.envfile in the cloned directory with the following contents:
USERNAME=user@example.org
HOSTNAME=example.ddns.net
PASSWORD=secret- Protect the file from unauthorized access:
chmod 600 .env- All the variables may also be read from the environment directly, so a
.envfile is not mandatory.
Just run the script:
./noip-updaterThe directory service contains a systemd unit as well as a systemd timer.
You might want to modify them with the correct script paths.
Place them in ~/.local/share/systemd/user/ and run the following commands to enable them:
systemctl --user enable noip.service
systemctl --user enable noip.timer
systemctl --user start noip.timerAdd the following to your crontab:
# noip2 update
@reboot systemd-cat -t noip /bin/bash path/to/script/noip-updater
0 */1 * * * systemd-cat -t noip /bin/bash path/to/script/noip-updater
Using @reboot didn't work properly on my Raspberry Pi 4...
docker run -d \
--name noip-updater \
-e USERNAME=example \
-e PASSWORD=supersecret \
-e HOSTNAME=example.ddns.net \
axelrindle/noip-updater