# Copyright (C) Inverse inc.
[Unit]
Description=PacketFence Redis Queue Service
Wants=packetfence-base.target packetfence-config.service packetfence-iptables.service
After=packetfence-base.target packetfence-config.service packetfence-iptables.service

[Service]
StartLimitBurst=3
StartLimitInterval=10
ExecStartPre=/bin/perl -I/usr/local/pf/lib -I/usr/local/pf/lib_perl/lib/perl5 '-Mpf::services::manager::redis_queue' -e 'pf::services::manager::redis_queue->new()->generateConfig()'
ExecStart=/usr/bin/redis-server /usr/local/pf/var/conf/redis_queue.conf --daemonize no
ExecStop=/bin/kill $MAINPID
Restart=on-failure
User=pf
Slice=packetfence.slice

[Install]
WantedBy=packetfence.target
