Skip to content

Instantly share code, notes, and snippets.

@xdtianyu
Created October 10, 2017 14:46
Show Gist options
  • Save xdtianyu/365ce82bdecf2d8649626b8095351a80 to your computer and use it in GitHub Desktop.
Save xdtianyu/365ce82bdecf2d8649626b8095351a80 to your computer and use it in GitHub Desktop.
#!/bin/sh
ping -c 1 10.200.0.1
if [ "$?" -eq 0 ];then
echo "$(date) --> OK"
else
echo "$(date) --> ERROR"
/etc/init.d/shadowvpn-cn restart
fi
@xdtianyu
Copy link
Author

          • /root/bin/ping.sh >>/tmp/ping.log 2>&1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment