From 20f26a504328fd3973da6b40b3991bb077fbd941 Mon Sep 17 00:00:00 2001 From: Ermal Date: Tue, 20 Jul 2010 19:57:36 +0000 Subject: Do not try to reload apinger config but always kill the running process and start a new one so it behaves. --- etc/inc/gwlb.inc | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'etc') diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 94ddd17..eda0b06 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -235,16 +235,13 @@ EOD; fwrite($fd, $apingerconfig); fclose($fd); - if (is_process_running("apinger")) { - sigkillbypid("{$g['varrun_path']}/apinger.pid", "HUP"); - } else { - if (is_dir("{$g['tmp_path']}")) - chmod("{$g['tmp_path']}", 01777); - if (is_dir("{$g['vardb_path']}/rrd")) - chown("{$g['vardb_path']}/rrd", "nobody"); - /* start a new apinger process */ - mwexec_bg("/usr/local/sbin/apinger -c {$g['varetc_path']}/apinger.conf"); - } + killbypid("{$g['varrun_path']}/apinger.pid"); + if (is_dir("{$g['tmp_path']}")) + chmod("{$g['tmp_path']}", 01777); + if (is_dir("{$g['vardb_path']}/rrd")) + chown("{$g['vardb_path']}/rrd", "nobody"); + /* start a new apinger process */ + mwexec_bg("/usr/local/sbin/apinger -c {$g['varetc_path']}/apinger.conf"); return 0; } -- cgit v1.1