pihole-opnsense-sync/pihole-opnsense-sync.service

14 lines
424 B
SYSTEMD

[Unit]
Description=Sync Pi-hole local DNS to OPNsense Unbound
[Service]
User=pihole
Group=pihole
EnvironmentFile=/etc/secrets/pihole-opnsense-sync
ExecStart=/opt/pihole-opnsense-sync/venv/bin/python /opt/pihole-opnsense-sync/syncer.py --opnsense https://192.168.1.1 --api-key ${OPNSENSE_API_KEY} --api-secret ${OPNSENSE_API_SECRET}
SyslogIdentifier=pihole-opnsense-sync
Restart=always
[Install]
WantedBy=multi-user.target