1
0
mirror of https://github.com/php/systems.git synced 2026-03-23 23:32:12 +01:00
Files
archived-systems/check-fails
Jim Winstead 99e33c2024 Fix check fails sender (#51)
* Fix sender in check-fails
2024-08-19 11:36:50 +01:00

19 lines
411 B
Bash
Executable File

#! /bin/sh
ME=`hostname`
SMTP_FROM=systems@php.net
SMTP_TO=systems@php.net
SMTP_SUBJECT="php.net systems: failed jobs on $ME"
SMTP_INTRO="please check /var/log/php-cron-box.log on $ME for details"
FAIL_LOGFILE=/var/log/php-cron-box.fail
if ! test -r $FAIL_LOGFILE; then
exit 0
fi
(echo $SMTP_INTRO; echo; cat $FAIL_LOGFILE) | \
mail -s "$SMTP_SUBJECT" -r $SMTP_FROM -- $SMTP_TO
rm -f $FAIL_LOGFILE