Skip to content

Instantly share code, notes, and snippets.

@peterlavelle
peterlavelle / autoshutdown-proxmox-ve.sh
Created August 23, 2021 13:04
#Quick script to shutdown a laptop when AC power is no longer being supplied and the battery is low. Can optionally send an alert out via Pushover or email (Need a functioning mail server for email) Tested on Proxmox VE. Needs the following packages installed on the target server: powermgmt-base, curl, util-linux
#!/bin/bash
#Quick script to shutdown a laptop when AC power is no longer being supplied and the battery is low.
#Can optionally send an alert out via Pushover or email (Need a functioning mail server for this)
#Tested on Proxmox VE. Needs the following packages installed on the target server: powermgmt-base curl util-linux
#Set alerting method (pushover/email/off)
#a value of 'off' here will disable all alerts
#Alerting method