Last active
April 9, 2019 04:46
-
-
Save mortn/f6ee0b039b75ac4858c8 to your computer and use it in GitHub Desktop.
DDNS/DynDNS/Dynamic DNS update systemd service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DDNSURL='https://my.dyndnshost.com/ddns.php?user=myUser&password=mySecretPassword&domain=example.com' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.