mirror of
https://github.com/darold/sendmailanalyzer.git
synced 2026-05-21 06:45:33 -06:00
Fix documentation about systemd start script. Thanks to Kenneth Fribert for the report.
This commit is contained in:
parent
709a398708
commit
6ac6c19afd
2 changed files with 31 additions and 9 deletions
|
|
@ -381,6 +381,8 @@ or use one of the starters script provided in the start_scripts/ directory.
|
||||||
|
|
||||||
=head2 Log rotate case
|
=head2 Log rotate case
|
||||||
|
|
||||||
|
=head3 Without systemd
|
||||||
|
|
||||||
If you use real time mode and you have logrotate installed on you maillog
|
If you use real time mode and you have logrotate installed on you maillog
|
||||||
file you must restart SendmailAnalyzer each time logrotate is used.
|
file you must restart SendmailAnalyzer each time logrotate is used.
|
||||||
To install it edit the /etc/logrotate.d/syslog file and add a line
|
To install it edit the /etc/logrotate.d/syslog file and add a line
|
||||||
|
|
@ -403,16 +405,35 @@ must be written differently, but not so much. For example:
|
||||||
/bin/kill -HUP `cat /var/run/sendmailanalyzer.pid` 2>/dev/null || true
|
/bin/kill -HUP `cat /var/run/sendmailanalyzer.pid` 2>/dev/null || true
|
||||||
endscript
|
endscript
|
||||||
|
|
||||||
And if you have an operating system that use systemd, you can set the following
|
=head3 With systemd
|
||||||
in the service file:
|
|
||||||
|
|
||||||
ExecStop=/usr/bin/pkill -TERM sendmailanalyzer
|
New Linux distributions have replaced the standard init SysV by the new
|
||||||
|
systemd linux centrics startup system. If you are using this system here
|
||||||
|
is the service file definition to use:
|
||||||
|
|
||||||
and in /etc/logrotate.d/syslog adding this to postrotate section:
|
sendmailanalyzer.service
|
||||||
|
|
||||||
/usr/bin/systemctl restart sendmailanalyzer.service > /dev/null 2>&1 || true
|
just copy it under /usr/lib/systemd/system/sendmailanalyzer.service
|
||||||
|
as root. Edit it to change the path to the sendmailanalyzer program
|
||||||
|
and change Requires/After directives whether you are running sendmail
|
||||||
|
or postfix. Then reload systemd with the following command as root:
|
||||||
|
|
||||||
|
|
||||||
|
systemctl --system daemon-reload
|
||||||
|
|
||||||
|
To start/stop sendmailanalyer use the following commands:
|
||||||
|
|
||||||
|
systemctl start sendmailanalyzer.service
|
||||||
|
systemctl stop sendmailanalyzer.service
|
||||||
|
|
||||||
|
If you want sendmailanalyzer to be run at boot time and stopped at
|
||||||
|
poweroff, you have to run the following command:
|
||||||
|
|
||||||
|
systemctl enable sendmailanalyzer.service
|
||||||
|
|
||||||
|
This will create the symlinks for you into the /etc/systemd/system/
|
||||||
|
directory.
|
||||||
|
|
||||||
=head2 Package install
|
=head2 Package install
|
||||||
|
|
||||||
In the packaging/ directory you will find all scripts and files to generate
|
In the packaging/ directory you will find all scripts and files to generate
|
||||||
|
|
|
||||||
|
|
@ -21,15 +21,16 @@ command:
|
||||||
|
|
||||||
chkconfig --add sendmailanalyzer
|
chkconfig --add sendmailanalyzer
|
||||||
|
|
||||||
Some new distributions like last version of Fedora have replaced the
|
New Linux distributions have replaced the standard init SysV by the new
|
||||||
standard init SysV by the new systemd linux centrics startup system.
|
systemd linux centrics startup system. If you are using this system here
|
||||||
If you are using this system here is the service definition to use:
|
is the service file definition to use:
|
||||||
|
|
||||||
sendmailanalyzer.service
|
sendmailanalyzer.service
|
||||||
|
|
||||||
just copy it under /usr/lib/systemd/system/sendmailanalyzer.service
|
just copy it under /usr/lib/systemd/system/sendmailanalyzer.service
|
||||||
as root. Edit it to change the path to the sendmailanalyzer program
|
as root. Edit it to change the path to the sendmailanalyzer program
|
||||||
and reload systemd with the following command as root:
|
and change Requires/After directives whether you are running sendmail
|
||||||
|
or postfix. Then reload systemd with the following command as root:
|
||||||
|
|
||||||
systemctl --system daemon-reload
|
systemctl --system daemon-reload
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue