From 2eba376ceba529f70929e5549d041f260b2fda71 Mon Sep 17 00:00:00 2001 From: "Danilo G. Baio (dbaio)" Date: Sat, 13 Dec 2014 10:47:44 -0200 Subject: apcupsd - fix rcfile for removing all types of lock files and put an information for email notifications --- config/apcupsd/apcupsd.inc | 6 +++--- config/apcupsd/apcupsd.xml | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'config') 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
+ + Notifications + listtopic + + + notification_info + info + In order to receive e-mail notifications, you need to configure + SMTP Email Notifications on Advanced/Notifications section, and also, + install mailreport package. + php_install_apcupsd(); -- cgit v1.2.3 From 134baa0bf035c07e1a8544754aa85066b857d5be Mon Sep 17 00:00:00 2001 From: "Danilo G. Baio (dbaio)" Date: Wed, 24 Dec 2014 09:49:48 -0200 Subject: apcupsd - fix code --- config/apcupsd/apcupsd.inc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'config') diff --git a/config/apcupsd/apcupsd.inc b/config/apcupsd/apcupsd.inc index 26a2214e..c123861c 100644 --- a/config/apcupsd/apcupsd.inc +++ b/config/apcupsd/apcupsd.inc @@ -167,9 +167,7 @@ function sync_package_apcupsd(){ $apcupsd_start .= " if [ ! -d {$lockfile} ]; then \n"; $apcupsd_start .= " /bin/mkdir -p {$lockfile} \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"; + $apcupsd_start .= " /bin/rm -f {$lockfile}/*LCK* 2>/dev/null \n"; if ($apcupsd_config['killonpowerfail']=="on"){ $apcupsd_start .= " " . APCUPSD_BASE . "/sbin/apcupsd --kill-on-powerfail"; }else{ -- cgit v1.2.3 From c1af350bd7f71c6f7fc791d075b8155d78472a6c Mon Sep 17 00:00:00 2001 From: "Danilo G. Baio (dbaio)" Date: Mon, 29 Dec 2014 13:16:15 -0200 Subject: apcupsd - bump version --- config/apcupsd/apcupsd.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/apcupsd/apcupsd.xml b/config/apcupsd/apcupsd.xml index 64919e68..8a42f352 100644 --- a/config/apcupsd/apcupsd.xml +++ b/config/apcupsd/apcupsd.xml @@ -40,7 +40,7 @@ Apcupsd Services: Apcupsd (General) Monitoring - 0.3.1 + 0.3.2 /usr/local/pkg/apcupsd.inc Apcupsd has been created/modified. Apcupsd has been deleted. -- cgit v1.2.3