From 67c532f594506464aed9fa95b63091bda5b723a9 Mon Sep 17 00:00:00 2001 From: maniacikarus Date: Fri, 8 May 2009 07:43:06 +0200 Subject: [PATCH] Fixed conn scheduler restart collectd when morning reconnect (graphs) --- src/scripts/connscheduler | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/scripts/connscheduler b/src/scripts/connscheduler index bc4d4eb656..824af248ab 100644 --- a/src/scripts/connscheduler +++ b/src/scripts/connscheduler @@ -79,11 +79,11 @@ sub hangup return; } - # now wait for active triggerfile and ppp daemon to disappear + # now wait for active triggerfile and ppp daemon to disappear # wait maximum 60 seconds my $counter = 60; sleep 1; - while ( -e "${General::swroot}/red/active" || -e '/var/run/ppp-ipfire.pid' || $counter == 0 ) + while ( -e "${General::swroot}/red/active" || -e '/var/run/ppp-ipfire.pid' || $counter == 0 ) { sleep 1; $counter--; @@ -123,12 +123,14 @@ sub reconnect # wait maximum 60 seconds my $counter = 60; sleep 1; - while ( -e "${General::swroot}/red/active" || -e '/var/run/ppp-ipfire.pid' || $counter == 0 ) + while ( -e "${General::swroot}/red/active" || -e '/var/run/ppp-ipfire.pid' || $counter == 0 ) { sleep 1; $counter--; } + /etc/init.d/collectd stop &dial(); + /etc/init.d/collectd start } @@ -168,7 +170,7 @@ sub profile ## FIXME: do we need to do this ? sleep($sleep_after_profile); &dial(); - } + } } @@ -200,7 +202,7 @@ sub timer } - if ( $CONNSCHED::config[$i]{'ACTION'} eq 'reconnect' ) + if ( $CONNSCHED::config[$i]{'ACTION'} eq 'reconnect' ) { &reconnect() } -- 2.39.2