diff options
author | root <root@homebase.dk> | 2014-02-27 12:34:03 +0100 |
---|---|---|
committer | root <root@homebase.dk> | 2014-02-27 12:38:53 +0100 |
commit | d87f3112d09a88ae6c47bc732d7c58f518b29aaa (patch) | |
tree | ec2d046f1062cb82cfb3e703821d732ae6be7f08 | |
parent | 55cd01bac0e15d65b0d8cec7e987c921f7d6b81e (diff) |
Add cron job to restart if mailman has gone stale.
-rwxr-xr-x | mailman/cron.daily/local-mailman | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mailman/cron.daily/local-mailman b/mailman/cron.daily/local-mailman new file mode 100755 index 0000000..c8e416b --- /dev/null +++ b/mailman/cron.daily/local-mailman @@ -0,0 +1,14 @@ +#!/bin/sh + +#set -e + +stem=/var/log/mailman/smtp + +# no smtp traffic for at least 24 hours means logfiles are empty +logsizes=$(find /var/log/mailman \( -name smtp -or -name smtp-failure -or -name smtp.1 -or -name smtp-failure.1 \) -printf '%b\n' | sort -u) + +if [ 0 = "$logsizes" ]; then + service mailman stop + slay list + service mailman start +fi |