⇤ ← Revision 1 as of 2013-06-27 08:29:13
Size: 647
Comment:
|
Size: 666
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 12: | Line 12: |
HOST=www.google.com | HOST=dns.sedimap.pvt |
Line 16: | Line 16: |
logger "$PROG: Ping OK" | logger "$PROG: Ping to $HOST OK" |
Line 18: | Line 18: |
logger "$PROG: Ping NOK, running dhclient eth0" | logger "$PROG: Ping to $HOST NOK, running dhclient eth0" |
Check connection
Simple script to check connection to a host, that in case of failure asks for new IP address through DHCP.
Add entry to crond of account with privileges to get address through dhclient:
chmod 755 /<folder>/checkConnection.sh
- crontab -e
* * * * * /<folder>/checkConnection.sh
On Slackware the logger output should apper on /var/log/messages.