Skip to content

Instantly share code, notes, and snippets.

View Freekers's full-sized avatar
👋

Freekers Freekers

👋
View GitHub Profile

Graceful shutdown of UDMP via NUT upon power loss

This documents everything I needed to get my Proxmox instance to listen to my Network UPS Tools (NUT) Server and initiate a shutdown script that would shutdown my UDM Pro upon power loss. This is needed as the UDM Pro does not have the ability to listen to a NUT server on it's own (what the hell ubiquiti).

I'm using a Synology NAS as a NUT server, but you can point your NUT client to any supported UPS. It's set to alert any clients subscribed to it when the UPS connected to it is in low battery. This all applies regardless of what machine you have a NUT server on, it does not have to be Synology.

Additionally these install steps were on my Proxmox machine, but these steps will probably work on any Debian GNU/Linux OS with little to no modification. YMMV

High level summary of the steps:

  • Install the NUT client on Proxmox
@Freekers
Freekers / mustreveal.go
Created August 31, 2020 12:16
rclone hash to password decryptor
// rclone hash to password decryptor - quick and dirty by Freekers
// will decrypt password based on hash in rclone config, in case you lost the password but still have the hash or config
// 1. install golang from here: https://golang.org/dl/
// 2. Open a cmd and run: go get github.com/rclone/rclone/fs/config/obscure
// 3. replace 'YOUR_HASH_HERE' with your hash and save the file
// 4. In cmd, run: go run mustreveal.go
// 5. The password is displayed.
package main