Merge pull request #21 from schizza/error-readme

Fix path discovery in HA
pull/22/head
schizza 2024-05-03 09:21:52 +02:00 committed by GitHub
commit e84ec8f69e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -196,7 +196,10 @@ echo -n "Creating 'exec.sh' script ... "
cat >$COMPLETE_PATH/exec.sh <<-EOF cat >$COMPLETE_PATH/exec.sh <<-EOF
#!/bin/bash #!/bin/bash
cat ./iptables_redirect/runscript | ssh -i ./iptables_redirect/ssl/ipt_dsa -o StrictHostKeyChecking=no -p $SSH_PORT -l $SSH_USER $HA_IP /bin/zsh RUN=$(find /homeassistant -name "iptables_redirect.sh" | sed -n 1p)
KEY=$(find /homeassistatnt -name "ipt_dsa" | sed -n 1p)
cat \$RUN | ssh -i \$KEY -o StrictHostKeyChecking=no -p $SSH_PORT -l $SSH_USER $HA_IP /bin/zsh
EOF EOF
exit_status $? "cat" \ exit_status $? "cat" \
@ -225,7 +228,7 @@ echo -n "Modifying configuration.yaml ... "
cat >>$HA_PATH/configuration.yaml <<EOF cat >>$HA_PATH/configuration.yaml <<EOF
shell_command: shell_command:
iptables_script: ./iptables_redirect/exec.sh iptables_script: /homeassistant/iptables_redirect/exec.sh
description: "Run iptables script on Home Assistant start." description: "Run iptables script on Home Assistant start."
mode: single mode: single