#!/bin/bash #pingcmd="ping -c 1" SERVER_IP="192.168.1.19" echo -e "Testing Connection...\n\n" if ! nmap -sn "${SERVER_IP}" | grep -q "Host is up";then echo -e "\nThe server is down\n" notify-send "Server offline" else echo -e "\nServer online\n" notify-send "Server Online" fi