/ Published in: Other
Expand |
Embed | Plain Text
#!/bin/sh # add ip / hostname separated by white space HOSTS="neilio.local" # no ping request COUNT=1 # email report when for myHost in $HOSTS do count=$(ping -c $COUNT $myHost | grep 'received' | awk -F',' '{ print $2 }' | awk '{ print $1 }') if [ $count -eq 0 ]; then # 100% failed osascript -e 'tell application "Finder" to open application file id "Thgs"' osascript -e 'tell application "Things" to activate' osascript -e 'delay 5' osascript -e 'tell application "Things" to close window 1' fi done
You need to login to post a comment.
