Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
cat << 'EOF' >/srv/ping_check.sh
while :; do
   sleep 30 

       PING=""
       ping -c 1 -w 3 freesoftwareservers.com > /dev/null    
       PING=$(echo $?)

       if [ $PING -ne 0 ]; then
           echo "Connected!"No connection"   
       else
           echo "No connectionConnected!" 
       fi
done
EOF
chmod +x /srv/ping_check.sh

cat << 'EOF' >/etc/cron.d/ping_loop
@reboot root /srv/ping_check.sh
EOF
chmod +x /etc/cron.d/ping_loop

...