I would like to ping a IP-Adress an want to be notified.
System: Linux Fedora.
Has anybody a idea or a Software?
Advertisement
Answer
Use this shell script. Found on http://jeromejaglale.com/doc/unix/shell_scripts/ping
JavaScript
x
#! /bin/sh
# -q quiet
# -c nb of pings to perform
ping -q -c5 google.com > /dev/null
if [ $? -eq 0 ]; then
echo "ok"
fi
Put the ping in a loop or run the script with cron. Instead of echoing you can send a notification.