Check whether the send of a mail after every reboot is present in the rc.local file

This commit is contained in:
Tristan 2019-03-13 14:37:49 +01:00
parent d52aa4915b
commit 9832da8b03

View file

@ -949,6 +949,17 @@ if [ `uname -s` == "OpenBSD" ]; then
fi
fi
if [ "$IS_REBOOTMAIL" = 1 ]; then
if [ -f /etc/rc.local ]; then
grep -qE '^date | mail -s "boot/reboot of' /etc/rc.local || echo 'IS_REBOOTMAIL FAILED!'
else
echo 'IS_REBOOTMAIL FAILED!'
if [[ "$VERBOSE" == 1 ]]; then
echo "Make sure /etc/rc.local exist and 'date | mail -s \"boot/reboot of $hostname' is present!"
fi
fi
fi
if [ "$IS_SOFTDEP" = 1 ]; then
grep -q "softdep" /etc/fstab || echo 'IS_SOFTDEP FAILED!'
fi