diff options
author | Danilo G. Baio (dbaio) <dbaio@bsd.com.br> | 2015-04-09 09:19:46 -0300 |
---|---|---|
committer | Danilo G. Baio (dbaio) <dbaio@bsd.com.br> | 2015-04-09 09:19:46 -0300 |
commit | ceaa0cc548063cf8e5964667a3fefef474fab3bc (patch) | |
tree | dfd933e66a4c092410b4920dc7cfb518cbbd15eb /config/apcupsd/apcupsd.inc | |
parent | cc9d2f862ca3a44a80a7a98691b31637f8b9b10c (diff) | |
download | pfsense-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/apcupsd/apcupsd.inc')
-rw-r--r-- | config/apcupsd/apcupsd.inc | 4 |
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}"]}" # ( |