Minor tweaks

pull/19/head
schizza 2024-04-30 17:17:54 +02:00
parent 88a4f2af49
commit edc63b83cb
1 changed files with 7 additions and 10 deletions

View File

@ -13,18 +13,16 @@ LINK="https://raw.githubusercontent.com/schizza/SWS-12500-custom-component/main/
FILENAME="iptables_redirect.sh"
SCRIPT_DIR="iptables_redirect"
P_HA=true
P_ST=true
declare -a HA_PATHS=(
"/homeassistant"
"$PWD"
"$PWD/config"
"/config"
"/homeassistant"
"$HOME/.homeassistant"
"/usr/share/hassio/homeassistant"
"./HA"
)
function info() { echo -e $2 "${GREEN_COLOR}$1${NO_COLOR}"; }
@ -224,7 +222,7 @@ exit_status $? "cat" \
"OK."
echo -n "Modifying configuration.yaml ... "
cat >> $HA_PATH/configuration.yaml <<EOF
cat >>$HA_PATH/configuration.yaml <<EOF
shell_command:
iptables_script: ./iptables_redirect/exec.sh
@ -263,4 +261,3 @@ info " First run of 'iptables_redirect.sh' script " -n
[ $FIRST_RUN -ne 0 ] && { error " failed." false; } || { info " passed."; }
info " SSH pub_key: at $COMPLETE_PATH/ssh/ipt_dsa.pub"