User Tools

Site Tools


ping_test_script_for_cron

Simple Ping test script

This is lame script for just to serve quick purpose.

| 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
ping_test_script_for_cron.txt · Last modified: 2020/08/10 02:35 (external edit)