From 2bdc987d53c159f84ef6b44468598e01c98e2a7d Mon Sep 17 00:00:00 2001 From: doktornotor Date: Mon, 10 Aug 2015 15:41:41 +0200 Subject: apcupsd - code style cleanup - Fix copyright header - Fix indendation - Fix file permissions (no need for these to be executable) - Remove useless empty tags - Attempt to make the descriptions more readable. --- config/apcupsd/apcupsd.xml | 347 +++++++++++++++++++++++---------------------- 1 file changed, 177 insertions(+), 170 deletions(-) (limited to 'config/apcupsd') diff --git a/config/apcupsd/apcupsd.xml b/config/apcupsd/apcupsd.xml index 364db8b8..38c84e81 100644 --- a/config/apcupsd/apcupsd.xml +++ b/config/apcupsd/apcupsd.xml @@ -1,46 +1,48 @@ - - + - - All rights reserved. - */ -/* ========================================================================== */ + apcupsd.xml + part of pfSense (https://www.pfSense.org/) + Copyright (C) 2013-2015 Danilo G. Baio + Copyright (C) 2015 ESF, LLC + All rights reserved. +*/ +/* ====================================================================================== */ /* - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - */ -/* ========================================================================== */ + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* ====================================================================================== */ ]]> Apcupsd Services: Apcupsd (General) Monitoring - 0.3.5 + 0.3.7 /usr/local/pkg/apcupsd.inc Apcupsd has been created/modified. Apcupsd has been deleted. @@ -48,22 +50,18 @@ https://packages.pfsense.org/packages/config/apcupsd/apcupsd.inc /usr/local/pkg/ - 0755 https://packages.pfsense.org/packages/config/apcupsd/apcupsd_status.php /usr/local/www/ - 0755 https://packages.pfsense.org/packages/config/apcupsd/apcupsd.conf.php /usr/local/pkg/ - 0755 https://packages.pfsense.org/packages/config/apcupsd/apcupsd_mail.php /usr/local/pkg/ - 0755 Apcupsd @@ -103,92 +101,99 @@ UPS Name upsname Use this to give your UPS a name in log files and such - input - 60 + input + 60 true UPS Cable upscable - -
-Possible generic choices for are:
- simple, smart, ether, usb
-
-Or a specific cable model number may be used:
- 940-0119A, 940-0127A, 940-0128A, 940-0020B,
- 940-0020C, 940-0023A, 940-0024B, 940-0024C,
- 940-1524C, 940-0024G, 940-0095A, 940-0095B,
- 940-0095C, M-04-02-2000 - ]]>
- input - 60 + +
+ Possible generic choices for 'cable' are:
+ simple, smart, ether, usb +

+ Or a specific cable model number may be used:
+ 940-0119A, 940-0127A, 940-0128A, 940-0020B,
+ 940-0020C, 940-0023A, 940-0024B, 940-0024C,
+ 940-1524C, 940-0024G, 940-0095A, 940-0095B,
+ 940-0095C, M-04-02-2000 + ]]> +
+ input + 60 true
UPS Type / Device upstype - -
-UPSTYPE DEVICE Description
-
-apcsmart /dev/tty** Newer serial character device, appropriate for - SmartUPS models using a serial cable (not USB).
-
-usb BLANK Most new UPSes are USB. A blank DEVICE - setting enables autodetection, which is - the best choice for most installations.
-
-net hostname:port Network link to a master apcupsd through apcupsd's - Network Information Server. This is used if the - UPS powering your computer is connected to a - different computer for monitoring.
-
-snmp hostname:port:vendor:community - SNMP network link to an SNMP-enabled UPS device. - Hostname is the ip address or hostname of the UPS - on the network. Vendor can be can be "APC" or - "APC_NOTRAP". "APC_NOTRAP" will disable SNMP trap - catching; you usually want "APC". Port is usually - 161. Community is usually "private".
-
-dumb /dev/tty** Old serial character device for use with - simple-signaling UPSes.
-
-pcnet ipaddr:username:passphrase:port - PowerChute Network Shutdown protocol which can be - used as an alternative to SNMP with the AP9617 - family of smart slot cards. ipaddr is the IP - address of the UPS management card. username and - passphrase are the credentials for which the card - has been configured. port is the port number on - which to listen for messages from the UPS, normally - 3052. If this parameter is empty or missing, the - default of 3052 will be used.
-
- ]]>
- input - 60 + + + For USB UPSes, please leave the DEVICE directive blank. For other UPS types, you must specify an appropriate port or address.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
UPSTYPEDEVICEDescription
apcsmart/dev/tty**Newer serial character device, appropriate for SmartUPS models using a serial cable (not USB).
usbBLANKMost new UPSes are USB. A blank DEVICE setting enables autodetection, which is the best choice for most installations.
nethostname:portNetwork link to a master apcupsd through apcupsd's Network Information Server. This is used if the  + UPS powering your computer is connected to a different computer for monitoring.
snmphostname:port:vendor:communitySNMP network link to an SNMP-enabled UPS device. Hostname is the ip address or hostname of the UPS on the network.
+ Vendor can be can be "APC" or "APC_NOTRAP". "APC_NOTRAP" will disable SNMP trap catching; you usually want "APC".
+ Port is usually 161. Community is usually "private".
dumb/dev/tty**Old serial character device for use with simple-signaling UPSes.
pcnetipaddr:username:passphrase:portPowerChute Network Shutdown protocol which can be used as an alternative to SNMP with the AP9617 family of smart slot cards.
+ ipaddr is the IP address of the UPS management card; username and passphrase are the credentials for which the card has been configured.
+ Port is the port number on which to listen for messages from the UPS, normally 3052. If this parameter is empty or missing, the default of 3052 will be used.
+ ]]> +
+ input + 60 true
Device device - input - 60 + input + 60 Poll Time polltime - Interval (in seconds) at which apcupsd polls the UPS for status. Default is 60 - input - 10 + Interval (in seconds) at which apcupsd polls the UPS for status. (Default: 60) + input + 10 60 @@ -200,9 +205,9 @@ UPSTYPE DEVICE Description
Lock File lockfile - Path for device lock file. Default is /var/tmp - input - 60 + Path for device lock file. (Default: /var/tmp) + input + 60 Configuration parameters used during power failures @@ -211,62 +216,65 @@ UPSTYPE DEVICE Description
OnBattery Delay onbatterydelay - Time in seconds from when a power failure is detected until we react to it with an onbattery event. Default is 6 - input - 10 + Time in seconds from when a power failure is detected until we react to it with an onbattery event. (Default: 6) + input + 10 6 Battery Level batterylevel If during a power failure, the remaining battery percentage (as reported by the UPS) is - below or equal to BATTERYLEVEL, apcupsd will initiate a system shutdown. Default is 5 - input - 10 + below or equal to BATTERYLEVEL, apcupsd will initiate a system shutdown. (Default: 5) + input + 10 5 Minutes minutes If during a power failure, the remaining runtime in minutes (as calculated internally - by the UPS) is below or equal to MINUTES, apcupsd, will initiate a system shutdown. Default is 3 - input - 10 + by the UPS) is below or equal to MINUTES, apcupsd, will initiate a system shutdown. (Default: 3) + input + 10 3 Timeout timeout If during a power failure, the UPS has run on batteries for TIMEOUT many seconds - or longer, apcupsd will initiate a system shutdown. A value of 0 (default) disables this timer - input - 10 + or longer, apcupsd will initiate a system shutdown. A value of 0 (default) disables this timer. + input + 10 0 Annoy annoy - Time in seconds between annoying users to signoff prior to system shutdown. 0 disables. Default is 300 - input - 10 + Time in seconds between annoying users to signoff prior to system shutdown. 0 disables. (Default: 300) + input + 10 300 Annoy Delay annoydelay - Initial delay after power failure before warning users to get off the system. Default is 60 - input - 10 + Initial delay after power failure before warning users to get off the system. (Default: 60) + input + 10 60 Kill Delay killdelay - If KILLDELAY is non-zero, apcupsd will continue running after a shutdown has been - requested, and after the specified time in seconds attempt to kill the power. This is for use - on systems where apcupsd cannot regain control after a shutdown. 0 disables (default) - input - 10 + + + This is for use on systems where apcupsd cannot regain control after a shutdown. 0 disables (default). + ]]> + + input + 10 0 @@ -277,7 +285,7 @@ UPSTYPE DEVICE Description
Net Server netserver If netstatus is on, a network information server process will be started for serving - the STATUS and EVENT data over the network (used by CGI programs) + the STATUS and EVENT data over the network (used by CGI programs). select on @@ -286,25 +294,31 @@ UPSTYPE DEVICE Description
- NIS Ip + NIS IP nisip - IP address on which NIS server will listen for incoming connections. Default value is - 0.0.0.0 which means any incoming request will be serviced. Alternatively, you can configure this - setting to any specific IP address of your server and NIS will listen for connections only on that - interface. Use the loopback address (127.0.0.1) to accept connections only from the local machine - input - 10 + + + Alternatively, you can configure this setting to any specific IP address of your server and NIS will listen for connections only on that interface.
+ Use the loopback address (127.0.0.1) to accept connections only from the local machine. + ]]> +
+ input + 10 0.0.0.0
NIS Port nisport - Port to use for sending STATUS and EVENTS data over the network. - It is not used unless NETSERVER is on. If you change this port, - you will need to change the corresponding value in the cgi directory - and rebuild the cgi programs. Default is 3551 as registered with the IANA - input - 10 + + + (Default is 3551 as registered with the IANA.) + ]]> + + input + 10 3551 @@ -314,7 +328,7 @@ UPSTYPE DEVICE Description
UPS Class upsclass - Normally standalone unless you share an UPS using an APC ShareUPS card + Normally standalone unless you share an UPS using an APC ShareUPS card. select standalone @@ -326,7 +340,7 @@ UPSTYPE DEVICE Description
UPS Mode upsmode - Normally disable unless you share an UPS using an APC ShareUPS card + Normally disable unless you share an UPS using an APC ShareUPS card. select disable @@ -339,20 +353,17 @@ UPSTYPE DEVICE Description
listtopic
- E-mail notification + E-mail notifications emailnotification - -
-phpMailer - In order to receive e-mail notifications through phpMailer, you need -to configure SMTP Email Notifications on Advanced/Notifications section, and also, -install mailreport package.
-This feature is currently broken on pfSense 2.2, for more info see pfSense forum: -APCupsd package status for pfSense.
-
-SMTP built-in - A simple SMTP mail client for apcupsd. -It does not have smtp authentication of any kind. -
- ]]>
+ +
+ phpMailer - In order to receive e-mail notifications through phpMailer, you need to configure SMTP Email Notifications on Advanced/Notifications section,  + and also install mailreport package.
+ This feature is currently broken on pfSense 2.2; for more info see pfSense forum: APCupsd package status for pfSense.

+ SMTP built-in - A simple SMTP mail client for apcupsd. It does not have smtp authentication of any kind. + ]]> +
select phpmailer @@ -361,51 +372,47 @@ It does not have smtp authentication of any kind.
- SMTP built-in + SMTP built-in settings listtopic SMTP Host smtphost - input - 20 + input + 20 SMTP Port smtpport - input - 5 + input + 5 From smtpfrom - input - 20 + input + 20 To smtpto - input - 20 + input + 20 Cc smtpcc - input - 20 + input + 20 php_install_apcupsd(); - - - validate_input_apcupsd($_POST, $input_errors); - sync_package_apcupsd(); php_deinstall_apcupsd(); -- cgit v1.2.3