From 9781bb161ddb9838bd1106b75319474d0d8aba45 Mon Sep 17 00:00:00 2001 From: Massaki Archambault Date: Wed, 4 Dec 2024 23:25:39 -0500 Subject: [PATCH] tweak NUT config --- hosts | 4 ++-- roles/nut-server/templates/62-nut-usbups.rules | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hosts b/hosts index 40590d1..d9e2c49 100644 --- a/hosts +++ b/hosts @@ -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: diff --git a/roles/nut-server/templates/62-nut-usbups.rules b/roles/nut-server/templates/62-nut-usbups.rules index 8c760a3..da7d7b4 100644 --- a/roles/nut-server/templates/62-nut-usbups.rules +++ b/roles/nut-server/templates/62-nut-usbups.rules @@ -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" \ No newline at end of file