# Copyright (C) Inverse inc.
[Unit]
Description=PacketFence Simple Network Management Protocol (SNMP) Trap Daemon.
After=packetfence-base.target
Wants=packetfence-base.target packetfence-config.service packetfence-iptables.service

[Service]
StartLimitBurst=3
StartLimitInterval=10
Type=simple
ExecStartPre=/usr/bin/perl -I/usr/local/pf/lib -I/usr/local/pf/lib_perl/lib/perl5 '-Mpf::services::manager::snmptrapd' -e 'pf::services::manager::snmptrapd->new()->generateConfig()'
ExecStart=/usr/sbin/snmptrapd -f -n -c /usr/local/pf/var/conf/snmptrapd.conf -C -A -Lf /usr/local/pf/logs/snmptrapd.log -p /usr/local/pf/var/run/snmptrapd.pid -On 
ExecReload=/bin/kill -HUP $MAINPID
Slice=packetfence.slice
Restart=on-failure

[Install]
WantedBy=packetfence.target
