Jean-Philippe Pialasse a768594f0f * Tue Mar 18 2025 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-9.sme
- update config for Nut 2.8.2 [SME: 12657]
  TODO review master/slave mode
  TODO convert master/slave to primary/secondary
  TODO convert to new config data + migrate
  TODO event and action
2025-05-14 23:06:09 -04:00

19 lines
612 B
Bash

#!/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