I’ve been playing around with Proxmox VE for a while on an old Ebay laptop and wanted to share a quick Bash script I wrote to automatically shut down the server when the AC power dies and the laptop’s battery capacity is below a specified threshold.
There’s also an option to send an alert via Pushover or Email when its going to shutdown the server
The script itself can be found on Github here
I know a laptop isn’t the ideal system to run a server from, but due to space constraints at home and having a backup power supply built-in by design in case of a power cut, it seemed like the best choice for my needs.
Hope someone finds this useful.
Feel free to mock by Bash scripting skills on Twitter.