shell-scripts/inet/is-back

12 lines
238 B
Bash
Executable file

#!/usr/bin/bash
while true; do
if (ping archlinux.org -W 5 -c 1); then
echo "Ping responded; internet is up."
notify-send "Internet is up." --app-name="Ping Test" --icon="$(pwd)/is-back-icon.png"
exit 0
else
continue
fi
done