Skip to content

opensourceworks-org/safe-shutdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

safe-shutdown

introduction

This service manages the safe shutdown of the machine it's running on.
for example:

  • plex is running and there's an active session
  • someone is logged and actively using the system
  • a user process is running (from a list, fuzzy logic)
  • ...

It takes a sentinel path as env var and immediately creates the sentinel file in that path.

A systemctl daemon should block shutdown if the sentinel file exists.

It's part of a bigger picture:

  • interface: a button on a raspberry pi zero w with LCD display
  • controller: a raspberry pi connected to the pc via ipmi/bmc and/or motherboard power/reset headers.
  • manager: api running on the controller, handling power through the controller and a tuya smart socket.

This allows the manager to check if the pc is on, and if it's safe to turn it off, and if it's not, to notify the user to turn it off manually.

Runs inside a docker container which starts with the host.

TODO

  • add config for "is safe?" checks with conditions (toml, yaml)
  • integrate custom checks

About

manage safe shutdowns

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published