# Copy the file as "/etc/systemd/system/sendmailanalyzer.service" # To run sendmailanalyzer, use: # systemctl start sendmailanalyzer.service # to enable automatic start at boot time, use: # systemctl enable sendmailanalyzer.service # to stop sendmailanalyzer: # systemctl stop sendmailanalyzer.service # # Feel free to modify the name of the PostgreSQL service following # your installation. # # For more info about custom unit files, see # http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F [Unit] Description=SendmailAnalyzer a sendmail/postfix log analyzer Requires=sendmail.service After=sendmail.service #Requires=postfix.service #After=postfix.service [Service] Type=forking PIDFile=/var/run/sendmailanalyzer.pid ExecStart=/usr/local/sendmailanalyzer/sendmailanalyzer -f ExecStop=/bin/bash -c "/bin/kill -TERM `/usr/bin/cat /var/run/sendmailanalyzer.pid`" [Install] WantedBy=multi-user.target