En effet j'ai pas de log, je viens de regarder à nouveau.
J'ai du mettre un truc qui va pas dans le script.
#!/bin/vbash
run=/opt/vyatta/bin/vyatta-op-cmd-wrapper
LOG_FILE=/var/log/renew_internet-restart.log
NEW_IP=`/sbin/ifconfig eth1.832 2>/dev/null | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'`
if [ -z "$NEW_IP" ]; then
logger -t watchdog -p err "Interface eth1.832 down"
exit 0
fi
# The list of hosts to ping
PING_HOSTS="
www.orange.fr www.google.com"
# Reading the default gateway
read _ _ GATEWAY _ < <(/sbin/ip -4 route list match 0/0)
# Pinging hosts, stopping at the first answer
for HOST in $PING_HOSTS; do
logger -t watchdog -p info "Pinging $HOST"
/bin/ping -c4 $HOST > /dev/null 2>&1
if [ $? -ne 0 ]; then
logger -t watchdog -p warn "Failed pinging $HOST"
else
exit 0
fi
done
# If we are here, then nothing is pinging. Try
# the default gateway
/bin/ping -c4 $GATEWAY > /dev/null 2>&1
if [ $? -ne 0 ]; then
logger -t watchdog -p err "Internet connection is broken"
$run renew dhcp interface eth1.832
fi