mirror of
https://github.com/rwinkhart/unifi-shutd.git
synced 2026-08-27 20:36:25 -04:00
main
unifi-shutd
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
- Install the
unifi-shutddaemon to/usr/local/bin/unifi-shutd - Generate the config file using
unifi-shutd config(run as root) - Install the service file for your init system
- OpenRC: Save 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)
- OpenRC: Save services/openrc to
- Enable and start the service
- Test disconnecting your UPS from AC and ensure the service properly shuts down your server
Languages
Go
92.3%
Shell
7.7%