#!/bin/bash #if MODE = netserver then access should be private #if MODE = netclient only enable monitor # calling this script to configure unit and drivers if [[ $(config getprop nut status || echo "disabled") == "disabled" ]] ; then # disable server # leave monitor as is, we might want to monitor an external ups ? # get_all_by_prop filter nut-driver@ and foreach $UPS disabled exit 0; fi # nut is enabled # enable nut-monitor # enable nut-server "enable nut-server.service\n" if ($master eq 'yes'); # get_all_by_prop filter nut-driver@ and foreach $UPS enable. /usr/libexec/nut-driver-enumerator.sh