diff options
author | Danilo G. Baio (dbaio) <dbaio@bsd.com.br> | 2014-12-13 10:47:44 -0200 |
---|---|---|
committer | Danilo G. Baio (dbaio) <dbaio@bsd.com.br> | 2014-12-13 10:47:44 -0200 |
commit | 2eba376ceba529f70929e5549d041f260b2fda71 (patch) | |
tree | 5118878d9d2d1b0d5beaafbcded0d84952dbd36b | |
parent | 40eb363a9851d8538adb9564d992e1ac6a276f07 (diff) | |
download | pfsense-packages-2eba376ceba529f70929e5549d041f260b2fda71.tar.gz pfsense-packages-2eba376ceba529f70929e5549d041f260b2fda71.tar.bz2 pfsense-packages-2eba376ceba529f70929e5549d041f260b2fda71.zip |
apcupsd - fix rcfile for removing all types of lock files and put an information for email notifications
-rw-r--r-- | config/apcupsd/apcupsd.inc | 6 | ||||
-rw-r--r-- | config/apcupsd/apcupsd.xml | 11 |
2 files changed, 14 insertions, 3 deletions
diff --git a/config/apcupsd/apcupsd.inc b/config/apcupsd/apcupsd.inc index 3340738a..26a2214e 100644 --- a/config/apcupsd/apcupsd.inc +++ b/config/apcupsd/apcupsd.inc @@ -167,9 +167,9 @@ function sync_package_apcupsd(){ $apcupsd_start .= " if [ ! -d {$lockfile} ]; then \n"; $apcupsd_start .= " /bin/mkdir -p {$lockfile} \n"; $apcupsd_start .= " fi \n"; - $apcupsd_start .= " if [ -f {$lockfile}/LCK.. ]; then \n"; - $apcupsd_start .= " /bin/rm -f {$lockfile}/LCK.. \n"; - $apcupsd_start .= " fi \n"; + $apcupsd_start .= " for X in $(/bin/ls {$lockfile} | /usr/bin/grep LCK); do \n"; + $apcupsd_start .= " /bin/rm -f {$lockfile}/\${X} \n"; + $apcupsd_start .= " done \n"; if ($apcupsd_config['killonpowerfail']=="on"){ $apcupsd_start .= " " . APCUPSD_BASE . "/sbin/apcupsd --kill-on-powerfail"; }else{ diff --git a/config/apcupsd/apcupsd.xml b/config/apcupsd/apcupsd.xml index 5ef2b946..64919e68 100644 --- a/config/apcupsd/apcupsd.xml +++ b/config/apcupsd/apcupsd.xml @@ -334,6 +334,17 @@ UPSTYPE DEVICE Description <br> <option><name>Share</name><value>share</value></option> </options> </field> + <field> + <name>Notifications</name> + <type>listtopic</type> + </field> + <field> + <fieldname>notification_info</fieldname> + <type>info</type> + <description>In order to receive e-mail notifications, you need to configure + SMTP Email Notifications on Advanced/Notifications section, and also, + install mailreport package.</description> + </field> </fields> <custom_php_install_command>php_install_apcupsd();</custom_php_install_command> <custom_php_command_before_form></custom_php_command_before_form> |