Skip to content

Instantly share code, notes, and snippets.

@mortn
Last active April 9, 2019 04:46
Show Gist options
  • Save mortn/f6ee0b039b75ac4858c8 to your computer and use it in GitHub Desktop.
Save mortn/f6ee0b039b75ac4858c8 to your computer and use it in GitHub Desktop.
DDNS/DynDNS/Dynamic DNS update systemd service
[Unit]
Description=DynDNS Updater services
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
EnvironmentFile=/etc/dyndns.conf
ExecStart=/usr/bin/wget -qO /tmp/dyndns.out '$DDNSURL'
[Install]
WantedBy=multi-user.target
DDNSURL='https://my.dyndnshost.com/ddns.php?user=myUser&password=mySecretPassword&domain=example.com'
@mortn
Copy link
Author

mortn commented Nov 15, 2015

K.I.S..S. FTW! It's not sophisticated but it will get the job done.
My ISP only change my DHCP assigned outer IP when the outer NIC changes MAC address, so it doesn't matter that the service only starts on network-online.target and not regularly as some may want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment