mirror of
https://github.com/JanJastrow/.dotfiles.git
synced 2024-11-22 02:29:57 +01:00
Add echo to show the function is running
This commit is contained in:
parent
c852b31a9d
commit
da9cb0c3ac
@ -102,6 +102,7 @@ function extract () {
|
|||||||
# Monitor IP/Host and report with Pushover
|
# Monitor IP/Host and report with Pushover
|
||||||
pnotify-online() {
|
pnotify-online() {
|
||||||
local ip_address="$1"
|
local ip_address="$1"
|
||||||
|
echo "Monitoring $ip_address …"
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
if ping -c 1 -W 1 "$ip_address" >/dev/null; then
|
if ping -c 1 -W 1 "$ip_address" >/dev/null; then
|
||||||
@ -114,6 +115,8 @@ pnotify-online() {
|
|||||||
|
|
||||||
pnotify-offline() {
|
pnotify-offline() {
|
||||||
local ip_address="$1"
|
local ip_address="$1"
|
||||||
|
echo "Monitoring $ip_address …"
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
if ! ping -c 1 -W 1 "$ip_address" >/dev/null; then
|
if ! ping -c 1 -W 1 "$ip_address" >/dev/null; then
|
||||||
echo "$1 is offline now."
|
echo "$1 is offline now."
|
||||||
|
Loading…
Reference in New Issue
Block a user