Skip to content

A daemon written in Go that is meant to run on a Proxmox host. It uses ping to detect a power outage by pinging a machine not on UPS. If an outage is detected it safely shuts down all VMs and CTs and then powers off the Proxmox node.

Notifications You must be signed in to change notification settings

naknak987/auto-shutdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation:

  1. Move the executable to /usr/local/bin
  2. Make sure the user has executable permissions on the executable using chmod u+x /usr/local/bin/auto-shutdown
  3. Customize the service file with the target IP address and any options you want
  4. Move the service file to /etc/systemd/system/
  5. Reload the systemd daemon with systemctl daemon-reload
  6. Enable the service with systemctl enable auto-shutdown
  7. Start the service with systemctl start auto-shutdown

TODO:

  • Create "installer" script
    • A shell script that just moves the files and sets special permissions on the executable
      • setcap cap_net_raw=+ep /path/to/your/compiled/binary
        • May not need to do this. Seemed to work without it
      • chmod u+x /path/to/your/compiled/binary

About

A daemon written in Go that is meant to run on a Proxmox host. It uses ping to detect a power outage by pinging a machine not on UPS. If an outage is detected it safely shuts down all VMs and CTs and then powers off the Proxmox node.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages