Tuesday, January 28, 2014

Shell script to ping IP


ping -c 4 $1 > /dev/null
if [[ $? -eq 0 ]]
echo "ping success at $(date)" >> /tmp/check_vpn.log
echo "ping failed at $(date)" >> /tmp/check_vpn.error

To use it:

# ./check_vpn.sh



* * * * * check_vpn.sh

1 comment:

  1. I just figured out that my computer has this kind of trojan. I was running pretty much all of the Anti-virus things my computer has. The main one says there is nothing there and my Windows defender says I have two trojans so I'm not sure what to do. I'm thinking of buying or building a new one. . Right now I have intel. Im not sure which is best like Dell, Miscrosoft, etc. I need a gaming computer which can also be used as a school work computer. Any ideas?.