Add more checl-scripts

This commit is contained in:
2017-02-21 01:19:22 +01:00
parent ad7a77eb5a
commit a97dd2781e
12 changed files with 687 additions and 0 deletions

26
OLD/check_amavis.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
_check_script="/root/bin/amavis_ckeck.pl"
if [ -x $_check_script ]; then
_check_result=`$_check_script --server 127.0.0.1 --from postmaster --to do-not-reply --port 10024`
_retval=$?
else
echo
echo "[ Error ]: Cannot find check script \"$_check_script\""
echo
exit 1
fi
if [ "$_retval" != "0" ]; then
echo
echo "[ Error ]: Amavis seems NOT to be running. trying to (re)start service.."
echo
/etc/init.d/amavis stop > /dev/null 2>&1
sleep 2
/etc/init.d/amavis start > /dev/null 2>&1
fi
exit 0