1
0
Fork 0

tweak NUT config

This commit is contained in:
Massaki Archambault 2024-12-04 23:25:39 -05:00
parent 270f03a702
commit 9781bb161d
2 changed files with 3 additions and 3 deletions

4
hosts
View File

@ -36,8 +36,8 @@ all:
nut_client:
ups: liebert-psi
sched:
# We want to shutdown this server quick
on_bat: 15
# We want to shutdown this server quicker
on_bat: 60
bastion:
hosts:
bastion:

View File

@ -1,7 +1,7 @@
SUBSYSTEM!="usb", GOTO="nut-usbups_rules_end"
{% for name, config in nut_server.ups.items() %}
ACTION=="add|change", SUBSYSTEM=="usb|usb_device", SUBSYSTEMS=="usb|usb_device", ATTR{idVendor}=="{{ config.vendorid }}", ATTR{idProduct}=="{{ config.productid }}", MODE="664", GROUP="nut", RUN+="/sbin/upsdrvctl stop; /sbin/upsdrvctl start"
ACTION=="add|change", SUBSYSTEM=="usb|usb_device", SUBSYSTEMS=="usb|usb_device", ATTR{idVendor}=="{{ config.vendorid }}", ATTR{idProduct}=="{{ config.productid }}", MODE="664", GROUP="nut", RUN+="/sbin/upsdrvctl stop || /sbin/upsdrvctl start"
{% endfor %}
LABEL="nut-usbups_rules_end"