summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2008-07-01 19:38:18 +0000
committerSeth Mos <seth.mos@xs4all.nl>2008-07-01 19:38:18 +0000
commite6f8542a38f17528fe45bee9fb1a305fe59f0fd0 (patch)
treec038beced8e8a978b29d3ba632620a2c7ab8ca08 /etc
parent13bbe450eb5c6682b757812892f8e1a634108ef8 (diff)
downloadpfsense-e6f8542a38f17528fe45bee9fb1a305fe59f0fd0.zip
pfsense-e6f8542a38f17528fe45bee9fb1a305fe59f0fd0.tar.gz
run as a different user, unlink status file at start.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc9
1 files changed, 5 insertions, 4 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 6732852..78848ff 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -4064,14 +4064,15 @@ function setup_gateways_monitor() {
global $config;
global $g;
+ unlink("{$g['varetc_path']}/apinger.conf");
$fd = fopen("{$g['varetc_path']}/apinger.conf", "w");
$apingerconfig = <<<EOD
# pfSense apinger configuration file. Automatically Generated!
## User and group the pinger should run as
-user "nobody"
-group "nobody"
+user "www"
+group "www"
## Mailer to use (default: "/usr/lib/sendmail -t")
#mailer "/var/qmail/bin/qmail-inject"
@@ -4181,10 +4182,10 @@ EOD;
if(is_process_running("apinger")) {
/* SIGHUP apinger processes */
- mwexec("/usr/bin/killall -1 apinger");
+ exec("/usr/bin/killall -1 apinger");
} else {
/* start a new apinger process */
- mwexec("/usr/local/sbin/apinger -c {$g['varetc_path']}/apinger.conf");
+ exec("/usr/local/sbin/apinger -c {$g['varetc_path']}/apinger.conf");
}
return 0;
}
OpenPOWER on IntegriCloud