1
0
Fork 0
home-stack-ansible/roles/nut-server/templates/62-nut-usbups.rules

7 lines
379 B
Plaintext
Raw Normal View History

2024-09-15 22:12:43 +00:00
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"
{% endfor %}
LABEL="nut-usbups_rules_end"