# Copyright (C) Inverse inc.
[Unit]
Description=PacketFence Iptables configuration
Wants=packetfence-base.target packetfence-config.service
After=packetfence-base.target packetfence-config.service

[Service]
StartLimitBurst=3
StartLimitInterval=10
ExecStart=/bin/perl -I/usr/local/pf/lib -I/usr/local/pf/lib_perl/lib/perl5 -Mpf::db -Mpf::services::manager::iptables -e 'my $db ; while(!$db) { eval { $db = db_ping() } ; sleep 1 } ; pf::services::manager::iptables->new()->startAndCheck()'
ExecStop=/bin/perl -I/usr/local/pf/lib -I/usr/local/pf/lib_perl/lib/perl5 '-Mpf::services::manager::iptables' -e 'pf::services::manager::iptables->new()->_stop()'
Slice=packetfence.slice

[Install]
WantedBy=packetfence.target

