diff --git a/check_decryption.sh b/check_decryption.sh new file mode 100644 index 0000000..de7bba9 --- /dev/null +++ b/check_decryption.sh @@ -0,0 +1,16 @@ +#!/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 \ No newline at end of file