From aa69dbd2565f89cb0df0f3c468e3c502cc1e2c42 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 7 Feb 2011 17:12:17 -0500 Subject: Do not launch multiple copies of the captive portal database pruner. --- etc/inc/captiveportal.inc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'etc/inc/captiveportal.inc') diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index de1c09e..08183f0 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -417,6 +417,10 @@ EOD; /* start up the webserving daemon */ captiveportal_init_webgui(); + /* Kill any existing prunecaptiveportal processes */ + if(file_exists("{$g['varrun_path']}/minicron.pid")) + killbypid("{$g['varrun_path']}/minicron.pid"); + /* start pruning process (interval defaults to 60 seconds) */ mwexec("/usr/local/bin/minicron $croninterval {$g['varrun_path']}/minicron.pid " . "/etc/rc.prunecaptiveportal"); -- cgit v1.1