diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-01-28 05:36:04 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-01-28 05:36:04 +0000 |
commit | 0b63bddea6e695528ec10a4df14855d071a6fd59 (patch) | |
tree | 65c8066873d5621e1167d963bdf3e38fc5a3aee4 /packages/tinydns/tinydns.inc | |
parent | 41c779aaa7763b2e7f6412b4b5af9ebdcf1ac37e (diff) | |
download | pfsense-packages-0b63bddea6e695528ec10a4df14855d071a6fd59.tar.gz pfsense-packages-0b63bddea6e695528ec10a4df14855d071a6fd59.tar.bz2 pfsense-packages-0b63bddea6e695528ec10a4df14855d071a6fd59.zip |
Use minicron since cron seems to stop running ping_hosts.sh after about 100 runs. Not sure what is going on with CRON but I am out of time of chasing its bad habits.
Diffstat (limited to 'packages/tinydns/tinydns.inc')
-rw-r--r-- | packages/tinydns/tinydns.inc | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/packages/tinydns/tinydns.inc b/packages/tinydns/tinydns.inc index ed024680..4ee32325 100644 --- a/packages/tinydns/tinydns.inc +++ b/packages/tinydns/tinydns.inc @@ -88,11 +88,14 @@ svscan_start () { /usr/bin/env \ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ /usr/sbin/daemon -f /bin/sh -c "\$command \$svscan_servicedir 2>&1 | /usr/local/bin/readproctitle service errors: ................................................................................................................................................................................................................................................................................................................................................................................................................ &" > /dev/null + minicron 1 /var/run/ping_hosts.pid /etc/ping_hosts.sh } svscan_stop_post () { echo "Stopping svscan." find -L "\$svscan_servicedir" -mindepth 1 -maxdepth 2 -type d \( \! -path "\$svscan_servicedir/*/*" -or -name 'log' \) -print0 | xargs -0 /usr/local/bin/svc -dx + PIDTOKILL=`cat /var/run/ping_hosts.pid` + kill $PIDTOKILL } run_rc_command "\$1" @@ -132,23 +135,6 @@ function tinydns_custom_php_changeip_command() { exec("/usr/local/bin/tinydns-conf Gtinydns Gdnslog /etc/tinydns {$ip}"); exec("/bin/mkdir /service"); exec("/bin/ln -s /etc/tinydns /service/"); - if($updatecron) { - $text_1 = "*/1 * * * * root /etc/ping_hosts.sh"; - $text_5 = "*/5 * * * * root /etc/ping_hosts.sh"; - $filenamea = "/etc/crontab"; - remove_text_from_file($filenamea, $text_1); - remove_text_from_file($filenamea, $text_5); - add_text_to_file($filenamea, $text_1); - } else { - $text_1 = "*/1 * * * * root /etc/ping_hosts.sh"; - $text_5 = "*/5 * * * * root /etc/ping_hosts.sh"; - $filenamea = "/etc/crontab"; - remove_text_from_file($filenamea, $text_1); - remove_text_from_file($filenamea, $text_5); - add_text_to_file($filenamea, $text_5); - } - - exec("killall -HUP cron"); conf_mount_ro(); filter_configure(); } |