See also powercontrol-server. See server repo for architecture idea.
- Create your
powercontrol-client.conf
from the example.poweroff_command
ispoweroff
for FreeBSD andsystemctl poweroff
for Debian.
- Make scripts executable, e.g.
chmod +x *.sh
- Configure
reset-clientstate.sh
to run on shutdown.- You can use
*.service
files with systemctl. Adjust them first, ... - then link into
/etc/systemd/system
, be sure to use the same filename, ... systemctl daemon-reload
, ...systemctl enable SERVICE_FILENAME
.
- You can use
- Configure
initialize-clientstate.sh
to run after boot.- See previous step for instructions when using systemctl.
- Add cron entry to run
statecheck-poweroff.sh
how often you like.