From 623dc9cf5d75636c75af624b6da3ea27d6a1cd18 Mon Sep 17 00:00:00 2001 From: Mollusk Date: Thu, 29 Oct 2026 14:59:00 -0400 Subject: [PATCH] serverping.sh: check only the server host and fix the up/down test Co-Authored-By: Claude Opus 5.5 --- serverping.sh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/serverping.sh b/serverping.sh index 950c038..08f9f3b 100644 --- a/serverping.sh +++ b/serverping.sh @@ -5,17 +5,8 @@ SERVER_IP="192.168.1.19" echo -e "Testing Connection...\n\n" -nmap -sP 192.168.1.1/24 > /tmp/addresses.txt - -#grep -Fxq "" - -#${pingcmd} ${SERVER_IP} &>/dev/null - -grepcmd=$(grep -F "${SERVER_IP}" /tmp/addresses.txt) - -echo $grepcmd -if [ ! ${grepcmd} ];then +if ! nmap -sn "${SERVER_IP}" | grep -q "Host is up";then echo -e "\nThe server is down\n" notify-send "Server offline" else