monitoring-plugins/check_decryption.sh
2020-04-30 15:09:51 +02:00

16 lines
No EOL
220 B
Bash
Executable file

#!/bin/bash
HOST=$1
PORT=$2
nc -z -w2 $HOST $PORT
STATUS=$?
if [[ $STATUS -eq 0 ]]; then
echo "$HOST:$PORT is waiting for disk decryption! Do it now!"
exit 2
else
echo "Port is closed, nothing to do"
exit 0
fi