This shows you the differences between two versions of the page.
ping_test_script_for_cron [2009/08/28 00:01] k2patel created |
ping_test_script_for_cron [2020/08/10 02:35] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Simple Ping test script ====== | ||
- | This is lame script for just to serve quick purpose. | ||
- | |||
- | <code bash | pingtest.sh> | ||
- | #!/bin/bash | ||
- | /sbin/ping -c 3 yahoo.com | ||
- | if [ $? -eq 0 ] | ||
- | then | ||
- | echo "Pinging" | ||
- | else | ||
- | echo "Not Pinging - Restarting Network" | ||
- | /etc/init.d/network restart | ||
- | fi | ||
- | </code> |