| Server IP : 82.208.35.60 / Your IP : 216.73.216.238 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/sysutils/munin-common/files/ |
Upload File : |
Allow overriding some variables.
--- plugins/node.d/nutups_.in.orig 2018-07-24 11:34:38 UTC
+++ plugins/node.d/nutups_.in
@@ -7,21 +7,25 @@
#
# usage: nutups_upsid_function
#
+# env.upsc <command> (default: "/bin/upsc")
+# env.upsconf <filename> (default: "/etc/nut/ups.conf")
+#
#%# family=contrib
#%# capabilities=autoconf suggest
UPS=$(basename "$0" | cut -d_ -f2)
FUNCTION=$(basename "$0" | cut -d_ -f3)
UPSC=$(command -v upsc)
+UPSCONF=${upsconf:-/etc/nut/ups.conf}
if [ "$1" = "autoconf" ]; then
- [ -x "$UPSC" ] && [ -r /etc/nut/ups.conf ] && echo yes && exit 0
- echo "no (upsc or /etc/nut/ups.conf not found)"
+ [ -x "$UPSC" ] && [ -r "$UPSCONF" ] && echo yes && exit 0
+ echo "no ($UPSC or $UPSCONF not found)"
exit 0
fi
if [ "$1" = "suggest" ]; then
- grep '^\[[^]]*\]$' /etc/nut/ups.conf \
+ grep '^\[[^]]*\]$' "$UPSCONF" \
| tr -d '][' \
| while read -r ups; do
for i in voltages freq charge current; do