aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorDanilo G. Baio (dbaio) <dbaio@bsd.com.br>2015-04-09 09:19:46 -0300
committerDanilo G. Baio (dbaio) <dbaio@bsd.com.br>2015-04-09 09:19:46 -0300
commitceaa0cc548063cf8e5964667a3fefef474fab3bc (patch)
treedfd933e66a4c092410b4920dc7cfb518cbbd15eb /config
parentcc9d2f862ca3a44a80a7a98691b31637f8b9b10c (diff)
downloadpfsense-packages-ceaa0cc548063cf8e5964667a3fefef474fab3bc.tar.gz
pfsense-packages-ceaa0cc548063cf8e5964667a3fefef474fab3bc.tar.bz2
pfsense-packages-ceaa0cc548063cf8e5964667a3fefef474fab3bc.zip
apcupsd - replace system exec `hostname` for php function gethostname()
Diffstat (limited to 'config')
-rw-r--r--config/apcupsd/apcupsd.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/config/apcupsd/apcupsd.inc b/config/apcupsd/apcupsd.inc
index 7255ceb1..0a99982d 100644
--- a/config/apcupsd/apcupsd.inc
+++ b/config/apcupsd/apcupsd.inc
@@ -259,10 +259,12 @@ function apccontrol_scripts_install($emailnotification){
}
}
+ $pfSense_hostname = gethostname();
+
$apccontrol_script_file=<<<EOF
#!/bin/sh
-HOSTNAME=`hostname`
+HOSTNAME="{$pfSense_hostname}"
MSG="{$apcstatus["{$apccontrol_script}"]}"
#
(