UPWORK/ODESK guru: Tips and Tricks for clients

skype: upwork.link , email: info@upwork.link

Postfix: systemd-services – mailgraph.service

without comments

File of service:
/etc/systemd/system/mailgraph.service

Activating service:

gate:/etc/systemd/system # systemctl enable mailgraph.service
ln -s ‘/etc/systemd/system/mailgraph.service’ ‘/etc/systemd/system/multi-user.target.wants/mailgraph.service’
gate:/etc/systemd/system #

Content of unit file:

[Unit]
Description=mailgraph mail log file analyzer
After=syslog.target

[Service]
EnvironmentFile=/etc/sysconfig/mailgraph
Nice=19
Type=forking
ExecStart=/usr/local/bin/mailgraph.pl -d -l ${MAIL_LOG} --daemon-rrd=${RRD_DIR} --daemon-pid=${PID_FILE}

[Install]
WantedBy=multi-user.target

Content of Environment File:
/etc/sysconfig/mailgraph

MAIL_LOG=/var/log/mail
PID_FILE=/var/run/mailgraph.pid
RRD_DIR=/var/cache/mailgraph.rrd

Written by spectre

September 8th, 2014 at 12:10 am

Posted in Postfix & Amavis

Leave a Reply

*