added systemd services

This commit is contained in:
Robert Walter
2024-04-12 12:25:59 +00:00
parent f0bba6eb31
commit d62639361f
3 changed files with 26 additions and 0 deletions

5
systemd/install-systemd.sh Executable file
View File

@@ -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

View File

@@ -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

View File

@@ -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