diff --git a/check_ssh.sh b/check_ssh.sh index 711a6ee..f591cd0 100755 --- a/check_ssh.sh +++ b/check_ssh.sh @@ -149,7 +149,7 @@ if $LOGGING ; then echo -e "\n Check if SSH service is running.." echo -e " =================================" fi -if ! ps -e f | grep -E "[[:digit:]]\ ${check_string_ps}" | grep -v grep > /dev/null ; then +if ! ps -e f | grep -E "[[:digit:]]\ .*\s?${check_string_ps}" | grep -v grep > /dev/null ; then error "SSH service seems to be down! Trying to restart service now.." if [[ -n "$SSHD_SERVICE_FILE" ]] ; then