added systemd services
This commit is contained in:
5
systemd/install-systemd.sh
Executable file
5
systemd/install-systemd.sh
Executable 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
|
||||
12
systemd/pdns-tsig-from-catalog.service
Normal file
12
systemd/pdns-tsig-from-catalog.service
Normal 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
|
||||
9
systemd/pdns-tsig-from-catalog.timer
Normal file
9
systemd/pdns-tsig-from-catalog.timer
Normal 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
|
||||
Reference in New Issue
Block a user