Files
kubernetes/home-assistant/restart-diddy-mopidy.sh
Dustin C. Hatch 8c605d0f9f home-assistant: Clean up restart_diddy_mopidy
Moving the shell command to an external script allows me to update it
without having to restart Home Assistant.

Including the SSH private key in the Secret not only allows it to be
managed by Kubernetes, but also works around a permissions issue when
storing the key in the `/config` volume.  The `ssh` command refuses to
use a key file with write permission for the group or other fields, but
the Kubelet sets `g=rw` when `fsGroup` is set on the pod.
2023-12-28 17:34:25 -06:00

3 lines
155 B
Bash

set -e
ssh -i /run/secrets/home-assistant/sshkey.pem -oUserKnownHostsFile=/config/ssh_known_hosts -oBatchMode=yes pi@diddy.pyrocufflink.red restart-mopidy