Fix path discovery in HA

pull/21/head
schizza 2024-05-03 09:18:52 +02:00
parent 964ba623b2
commit b6edb63051
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 $COMPLETE_PATH/runscript | ssh -i $COMPLETE_PATH/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