= 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 //checkConnection.sh * crontab -e * * * * * * //checkConnection.sh {{{#!highlight bash #!/bin/sh PROG=checkConnection HOST=dns.sedimap.pvt ping $HOST -c 5 > /dev/null RES=$? if [ $RES -eq 0 ]; then logger "$PROG: Ping to $HOST OK" else logger "$PROG: Ping to $HOST NOK, running dhclient eth0" dhclient eth0 -v fi }}} On Slackware the logger output should apper on '''/var/log/messages'''.