diff options
-rw-r--r-- | etc/inc/gwlb.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 59c42b6..5a328d2 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -238,7 +238,9 @@ EOD; fwrite($fd, $apingerconfig); fclose($fd); - if(!is_process_running("apinger")) { + 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")) @@ -246,6 +248,7 @@ EOD; /* start a new apinger process */ mwexec_bg("/usr/local/sbin/apinger -c {$g['varetc_path']}/apinger.conf"); } + return 0; } |