X-Git-Url: https://git.madduck.net/code/molly-guard.git/blobdiff_plain/74b4fac8c472f4fa61c0399c65a7d14f208b02e3..3fb8d0418be397c5f4e29aa2e74dd2cf378b68e0:/checks.d/10-print-message diff --git a/checks.d/10-print-message b/checks.d/10-print-message deleted file mode 100755 index cb4a483..0000000 --- a/checks.d/10-print-message +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# -# print a warning message before rebooting/shutting down etc a machine. -# -# Copyright Andrew Ruthven -# Released under the terms of the Artistic Licence 2.0 -# -# Cat out either /etc/molly-guard.$CMD.message -# or /etc/molly-guard.message -# If present. -CMD=$1; shift - -FILE= -BANNER= - -if [ -f /etc/molly-guard.$CMD.message ]; then - echo "$(hostname -s) has a $CMD warning message:" - FILE=/etc/molly-guard.$CMD.message -elif [ -f /etc/molly-guard.message ]; then - FILE=/etc/molly-guard.message - echo "$(hostname -s) has a warning message:" -fi - -if [ "x$FILE" != "x" ]; then - echo $BANNER - cat $FILE - echo "" -fi