Add shinobi, wakeonlan workaround, optimized harmony switch code

Tá an tiomantas seo le fáil i:
Florian Brinker
2019-10-13 02:09:48 +02:00
tuismitheoir 2e501bc322
tiomantas fe5f9caca4
D'athraigh 9 comhad le 198 breiseanna agus 78 scriosta

22
scripts/install-wakeonlan-sshkey.sh Comhad infheidhmithe
Féach ar an gComhad

@@ -0,0 +1,22 @@
#!/usr/bin/env bash
DIR=$(dirname "$(readlink -f "$0")")
KEYFILE="$DIR/../ssh-key/homeassistant-wakeonlan-sshkey"
TARGET="$HOME/.ssh/authorized_keys"
if [ ! -f $KEYFILE ]; then
echo "You need to create the SSH-Key-File first: \"$KEYFILE\""
echo "Use: \"ssh-keygen -t ed25519 -C homeassistant-wakeonlan-sshkey -f $KEYFILE\""
exit 1
fi
if ! which wakeonlan > /dev/null; then
echo "You need to install \"wakeonlan\" first. Otherwise the ssh-key will be useless."
exit 1
fi
SSHKEY=$(<"$KEYFILE.pub")
echo "command=\"wakeonlan \$SSH_ORIGINAL_COMMAND\" $SSHKEY" >> $TARGET
echo "Installed the ssh key into \"$TARGET\"."