script question
I want to delete a route in case it exists.
My script is:
if ip route | grep "80.0.0.0/8 dev ipsec0"
then
ip route del 80.0.0.0/8 dev ipsec0
logger -i -t myscript -- deleted
else
logger -i -t myscript -- not deleted
fi
exit 0
I'm running this every 10 minutes with a cronjob.
/bin/sh /tmp/myscript
Even if the route exists it tells me "not deleted".
If I run the script from the command line it deletes the route.
Any ideas why?
|