Skip to content

Commit 7111d0a

Browse files
authored
Create OSX_sms_ping.sh
1 parent 2fa0375 commit 7111d0a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

OSX_sms_ping.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
### ping ###
4+
/sbin/ping -t 1 -q -c 1 server > /dev/null
5+
retval=$?
6+
7+
# If value = 2 (fail) [0 is succes] then send msg
8+
if [ $retval -eq 2 ]; then
9+
/usr/local/bin/wget -O - -q "https://smsapi.free-mobile.fr/sendmsg?user=00000000&pass=TOKEN&msg=Hostname%20down%20%21"
10+
fi

0 commit comments

Comments
 (0)