diff --git a/systemd/install-systemd.sh b/systemd/install-systemd.sh new file mode 100755 index 0000000..964d625 --- /dev/null +++ b/systemd/install-systemd.sh @@ -0,0 +1,5 @@ +#!/bin/bash +cp pdns-tsig-from-catalog.service pdns-tsig-from-catalog.timer /etc/systemd/system/ +systemctl daemon-reload +systemctl enable pdns-tsig-from-catalog.timer +systemctl start pdns-tsig-from-catalog.timer diff --git a/systemd/pdns-tsig-from-catalog.service b/systemd/pdns-tsig-from-catalog.service new file mode 100644 index 0000000..8a5aaae --- /dev/null +++ b/systemd/pdns-tsig-from-catalog.service @@ -0,0 +1,12 @@ +[Unit] +Description=Running pdns-tsig-from-catalog script +Wants=pdns-tsig-from-catalog.timer + +[Service] +Type=oneshot +WorkingDirectory=/opt/scripts/pdns-tsig-from-catalog/ +Environment="PATH=/opt/scripts/pdns-tsig-from-catalog/.venv/bin/" +ExecStart=python pdns-tsig-from-catalog.py + +[Install] +WantedBy=multi-user.target diff --git a/systemd/pdns-tsig-from-catalog.timer b/systemd/pdns-tsig-from-catalog.timer new file mode 100644 index 0000000..71c0ffb --- /dev/null +++ b/systemd/pdns-tsig-from-catalog.timer @@ -0,0 +1,9 @@ +[Unit] +Description=cron for pdns-tsig-from-catalog.service + +[Timer] +Unit=pdns-tsig-from-catalog.service +OnCalendar=*-*-* *:*:00 + +[Install] +WantedBy=timers.target