You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like systemd timers more than cronjobs so I wrote one.
Benefit against cronjob: It runs immediately after boot and from then every 5 minutes. A cronjob runs every fifth minute, i.e. you have to wait 2.5 minutes after boot on average for a initial update.
sudo curl -L https://github.com/FarrowStrange/hetzner-api-dyndns/releases/download/v1.3/dyndns.sh -o /usr/local/bin/hetzner-api-dyndns
sudo chmod +x /usr/local/bin/hetzner-api-dyndns
sudo mkdir -p /etc/hetzner-api-dyndns
cat <<EOF | sudo tee /etc/hetzner-api-dyndns.confHETZNER_ZONE_NAME=examle.comHETZNER_RECORD_NAME=yourhostHETZNER_RECORD_TYPE=AAAAHETZNER_AUTH_API_TOKEN=<token>EOF
cat <<EOF | sudo tee /etc/systemd/system/hetzner-api-dyndns.service[Unit]Description=update dyndns entry via hetzner APIAfter=network-online.target[Service]EnvironmentFile=/etc/hetzner-api-dyndns.confExecStart=/usr/local/bin/hetzner-api-dyndnsEOF
cat <<EOF | sudo tee /etc/systemd/system/hetzner-api-dyndns.timer[Unit]Description=update dyndns entry via hetzner API every five minutes[Timer]Unit=hetzner-api-dyndns.service# my network takes longer for the IPv6 addressOnBootSec=20OnUnitActiveSec=5m[Install]WantedBy=timers.targetEOF
sudo systemctl daemon-reload
sudo systemctl enable --now hetzner-api-dyndns.timer
The text was updated successfully, but these errors were encountered:
I like systemd timers more than cronjobs so I wrote one.
Benefit against cronjob: It runs immediately after boot and from then every 5 minutes. A cronjob runs every fifth minute, i.e. you have to wait 2.5 minutes after boot on average for a initial update.
The text was updated successfully, but these errors were encountered: