Support authentication and auto-UPS-ID-detection

This commit is contained in:
2025-12-13 19:18:37 -05:00
parent 47a2a02e90
commit 7b38b6a4e2
5 changed files with 97 additions and 24 deletions
+5 -4
View File
@@ -2,9 +2,10 @@
This is a simple daemon that monitors the in-built NUT server on a Ubiquiti UniFi UPS and safely shuts down the active system when the UPS switches to battery power (on AC loss).
## Usage
1. Install the `unifi-shutd` daemon to `/usr/local/bin/unifi-shutd`.
2. Install the service file for your init system (be sure to edit the arguments first!!)
1. Install the `unifi-shutd` daemon to `/usr/local/bin/unifi-shutd`
2. Generate the config file using `unifi-shutd config` (run as root)
3. Install the service file for your init system
- OpenRC: Save [services/openrc](https://raw.githubusercontent.com/rwinkhart/unifi-shutd/refs/heads/main/services/openrc) to `/etc/init.d/unifi-shutd`
- systemd: Not yet implemented (feel free to contribute; I just haven't bothered because all my baremetal servers are based on Alpine Linux)
3. Enable and start the service
4. Test disconnecting your UPS from AC and ensure the service properly shuts down your server
4. Enable and start the service
5. Test disconnecting your UPS from AC and ensure the service properly shuts down your server