while (true); do sleep 29d rm -f /tmp/ez-ipupdate.cache /usr/sbin/ez-ipupdate -c /etc/ez-ipupdate.conf 2>&1 | logger -t ez-ipupdate done
called from S99done with /etc/init.d/dyndns &
Yes, ugly, but it avoids the reboot issue you mentioned.
BTW, there's no need to store the date of the last touch in any other file because there's already one: /tmp/ez-ipupdate.cache gets written with the last touch. Unfortunately, I didn't see an easy way for the "more than 29 days since writing that file" evaluation using the command line utilties OpenWRT offers. Maybe you have an idea?
Thank's for this script, I'm using a Leaf Bearing-uClibc firewall and had just to simply copy your script in directory /etc/cron.daily. It works that's what counts !
2 comments:
My solution:
#!/bin/sh
while (true); do
sleep 29d
rm -f /tmp/ez-ipupdate.cache
/usr/sbin/ez-ipupdate -c /etc/ez-ipupdate.conf 2>&1 | logger -t ez-ipupdate
done
called from S99done with
/etc/init.d/dyndns &
Yes, ugly, but it avoids the reboot issue you mentioned.
BTW, there's no need to store the date of the last touch in any other file because there's already one: /tmp/ez-ipupdate.cache gets written with the last touch. Unfortunately, I didn't see an easy way for the "more than 29 days since writing that file" evaluation using the command line utilties OpenWRT offers. Maybe you have an idea?
Anyway, thanks for the inspiration. :)
Hanno
Thank's for this script, I'm using a Leaf Bearing-uClibc firewall and had just to simply copy your script in directory /etc/cron.daily. It works that's what counts !
bye.
Post a Comment