I'm running ASSP on CentOS 7 which uses systemd. The only pre-made service file I could find (howtoforge.com) uses oneshot type which I'm not sure is right. More importantly, the stop command seems to kill all perl programs I have running (so I commented that out). But now I'm not sure it's stopping properly on shutdown. Can someone advice on how to improve the service file:
[Unit]
Description=AntiSpam SMTP Proxy
After=network.target
[Service]
Type=Simple
Environment=PERL5LIB=/root/perl5/lib/perl5/
ExecStartPre=-rm -f /usr/local/assp/pid
ExecStart=/usr/bin/perl /usr/local/assp/assp.pl /usr/local/assp/
ExecStopPost=-rm -f /usr/local/assp/pid
[Install]
WantedBy=multi-user.target