Op zondag 01 juli 2001 00:40 schreef [nielsonline] het volgende:
Je tijd staat niet goed?
probeer: rdate -s widexs.nl
hmmz dat doet ie goed maar het gaat weer fout bij de 3ex pingen in me script... dit is me script..
#!/bin/bash
echo "shutdown script by TDJ (c)2001"
echo loading...
shutdown=0
ping -c1 10.0.0.2 > /dev/null
if [ $? = 0 ]; then
shutdown=1
else
shutdown=0
echo host 10.0.0.2 not alive
fi
ping -c1 10.0.0.3 > /dev/null
if [ $? = 0 ]; then
shutdown=1
else
shutdown=0
echo host 10.0.0.1 not alive
fi
ping -c1 10.0.0.5 > /dev/null
if [ $? = 0 ]; then
shutdown=1
else
echo host 10.0.0.5 not alive
shutdown=0
fi
if [ $shutdown=0 ]; then
echo going down, all clients are down
else
echo stay alive
uptime
fi
echo $shutdown
ik zit er aaan te denken na elke ping dan
rdate -s widexs.nl te zetten