Merge branch 'main' of github.com:JanJastrow/.dotfiles

This commit is contained in:
Jan Jastrow 2023-06-15 18:02:14 +02:00
commit 407d693949
1 changed files with 3 additions and 0 deletions

View File

@ -102,6 +102,7 @@ function extract () {
# Monitor IP/Host and report with Pushover
pnotify-online() {
local ip_address="$1"
echo "Monitoring $ip_address …"
while true; do
if ping -c 1 -W 1 "$ip_address" >/dev/null; then
@ -114,6 +115,8 @@ pnotify-online() {
pnotify-offline() {
local ip_address="$1"
echo "Monitoring $ip_address …"
while true; do
if ! ping -c 1 -W 1 "$ip_address" >/dev/null; then
echo "$1 is offline now."