run periodically

This commit is contained in:
pj 2021-02-27 01:01:43 +01:00
parent 49ae3aba32
commit 4aa3b5a841
2 changed files with 23 additions and 0 deletions

13
ovh-dns-updater.service Normal file
View file

@ -0,0 +1,13 @@
[Unit]
Description=Check DNS records at OVH
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
ExecStart=/usr/bin/python3 -u /absolute/path/to/ovh-dns-udater.py
#StandardOutput=journal+console
StandardOutput=file:/var/log/foo/stdout
StandardError=file:/var/log/foo/stderr

10
ovh-dns-updater.timer Normal file
View file

@ -0,0 +1,10 @@
[Unit]
Description=run ovh-dns-updater periodically
[Timer]
OnBootSec=180
OnUnitActiveSec=900
Persistent=true
[Install]
WantedBy=timers.target