# Copyright (C) Inverse inc.
[Unit]
Description=PacketFence GO DNS Server Daemon
Wants=packetfence-keepalived.service packetfence-base.target packetfence-config.service packetfence-iptables.service
After=packetfence-keepalived.service packetfence-base.target packetfence-config.service packetfence-iptables.service
Before=packetfence-httpd.portal.service

[Service]
StartLimitBurst=3
StartLimitInterval=60
Type=notify
Environment=LOG_LEVEL=INFO
ExecStartPre=/bin/perl -I/usr/local/pf/lib -I/usr/local/pf/lib_perl/lib/perl5 '-Mpf::services::manager::pfdns' -e 'pf::services::manager::pfdns->new()->generateConfig()'
ExecStart=/usr/local/pf/sbin/pfdns -conf=/usr/local/pf/var/conf/pfdns.conf
Restart=on-failure
Slice=packetfence.slice

[Install]
WantedBy=packetfence.target
