mirror of
https://github.com/darold/sendmailanalyzer.git
synced 2026-05-15 22:02:32 -06:00
[GH-ISSUE #49] Start script #40
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/sendmailanalyzer#40
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lloydsystems on GitHub (Jun 25, 2017).
Original GitHub issue: https://github.com/darold/sendmailanalyzer/issues/49
I have a suggestion for a simple improvement. I have been testing this software on a CentOS system. I built the source into RPM with the spec file provided.
The SendmailAnalyzer service must be restarted after a mail log rotation. A conditional restart would be best in this case to avoid reactivating the service if it has been manually stopped. However, the init script provided does not support this feature. I modified the init script to add a 'condrestart' function thus:
`case "$1" in
'start')
sa_start
;;
'stop')
sa_stop
;;
'restart')
sa_restart
;;
'condrestart')
[ -e $LOCKFILE ] && $0 restart || :
;;
'status')
status sendmailanalyzer
;;
*)
echo "usage $0 start|stop|restart|condrestart|status"
esac
`
This is fairly typical code for the conditional restart function. Perhaps this could be added in future updates.
Thanks,
Steve Jones
@darold commented on GitHub (Jun 25, 2017):
Applied in commit
3b7d8c6, thanks.