#!/bin/bash if [ ping -c 2 192.168.2.101 | grep -o "Destination Host Unreachable" ] then ifconfig eth0 up sleep 30 (path to rerun script) elif [ ping -c 2 192.168.2.106 | grep -o "Destination Host Unreachable" ] then ifconfig eth0 up sleep 30 (path to rerun script) else ifconfig eth0 down sleep 30 fi
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)