[Nut-upsuser] New improved version of nut-report script
Larry Fahnoe
fahnoe at fahnoetech.com
Sun Jul 14 20:02:03 BST 2019
A couple of different issues with the reporting script. First the password
masking is not working as intended: I have three different passwords in my
ups.users file and only the last one is masked. Here's the first part of
the resulting report where I've replaced the unmasked passwords with
<PASSWORD-n>.
NUT configuration 2019-07-14 16:58:15 UTC
########### Operating system ###########
4.19.57-v7+ GNU/Linux
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_CODENAME=buster
########### /etc/nut/nut.conf ###########
MODE=netserver
########### /etc/nut/ups.conf ###########
maxretry = 3
[ups]
driver = tripplite_usb
port = auto
desc = "Tripp Lite SMART2200VS"
product = ".*SMART2200.*"
########### /etc/nut/upsd.conf ###########
LISTEN 0 3493
########### /etc/nut/upsd.users ###########
[admin]
password = *<PASSWORD-1>*
actions = SET
instcmds = ALL
[upsmon]
password = *<PASSWORD-2>*
upsmon master
[monuser]
password = *********
upsmon slave
########### /etc/nut/upsmon.conf ###########
MONITOR ups at localhost 1 upsmon *<PASSWORD-2>* master
MINSUPPLIES 1
Second, although CMDSCRIPT is defined in upssched.conf, (and the file
exists), it is not being found by the reporting script:
########### /etc/nut/upssched.conf ###########
CMDSCRIPT /usr/local/bin/upssched-cmd
PIPEFN /var/run/nut/upssched.pipe
LOCKFN /var/run/nut/upssched.lock
AT ONBATT * START-TIMER shutdown-timer 600
AT ONLINE * CANCEL-TIMER shutdown-timer
AT LOWBATT * START-TIMER low-battery-timer 5
AT LOWBATT * START-TIMER shutdown-timer 65
AT ONLINE * EXECUTE ONLINE
AT ONBATT * EXECUTE ONBATT
AT LOWBATT * EXECUTE LOWBATT
AT FSD * EXECUTE FSD
AT COMMOK * EXECUTE COMMOK
AT COMMBAD * EXECUTE COMMBAD
AT SHUTDOWN * EXECUTE SHUTDOWN
AT REPLBATT * EXECUTE REPLBATT
AT NOCOMM * EXECUTE NOCOMM
AT NOPARENT * EXECUTE NOPARENT
* ########### <scriptname> ###########*
*Cannot access <scriptname>*
As you've asked about bash versions, this system provides:
GNU bash, version 5.0.3(1)-release (arm-unknown-linux-gnueabihf)
--Larry
--
Larry Fahnoe, Fahnoe Technology Consulting, fahnoe at FahnoeTech.com
Minneapolis, Minnesota www.FahnoeTech.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20190714/6bba3bec/attachment-0001.html>
More information about the Nut-upsuser
mailing list