This service lets you shut down a remote Raspberry or any other Unix system when you shut down your main system.
- Log in as root in your main system, and generate a pair of SSH keys.
ssh-copy-id
the root user's public key into the remote Raspberry.- Edit and place the
shutdownpi.service
file in/etc/systemd/system
. - Enable the service with
systemctl enable shutdownpi.service
.