From ce2d93301b5b8905378252f6205558959733d0dd Mon Sep 17 00:00:00 2001 From: apz Date: Fri, 6 May 2022 00:10:20 +0200 Subject: [PATCH 1/2] cert_verify --- conf/appdaemon.yaml.example | 1 + dockerStart.sh | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/conf/appdaemon.yaml.example b/conf/appdaemon.yaml.example index 5d5a05d73..839cfdbc9 100644 --- a/conf/appdaemon.yaml.example +++ b/conf/appdaemon.yaml.example @@ -8,6 +8,7 @@ appdaemon: type: hass ha_url: token: + cert_verify: True http: url: admin: diff --git a/dockerStart.sh b/dockerStart.sh index c37c1ec79..76b1f0a2c 100755 --- a/dockerStart.sh +++ b/dockerStart.sh @@ -33,6 +33,11 @@ if [ -n "$TOKEN" ]; then sed -i "s/^ token:.*/ token: $(echo $TOKEN | sed -e 's/\\/\\\\/g; s/\//\\\//g; s/&/\\\&/g')/" $CONF/appdaemon.yaml fi +# if ENV CERT_VERIFY is set, change the value in appdaemon.yaml +if [ -n "$CERT_VERIFY" ]; then + sed -i "s/^ cert_verify:.*/ cert_verify: $(echo $CERT_VERIFY | sed -e 's/\\/\\\\/g; s/\//\\\//g; s/&/\\\&/g')/" $CONF/appdaemon.yaml +fi + # if ENV DASH_URL is set, change the value in appdaemon.yaml if [ -n "$DASH_URL" ]; then if grep -q "^ url" $CONF/appdaemon.yaml; then From b4e03efe730d0b85d474c29c84b3eb90c3ba358b Mon Sep 17 00:00:00 2001 From: apz Date: Tue, 28 Jun 2022 22:46:43 +0200 Subject: [PATCH 2/2] rename HA_CERT_VERIFY --- dockerStart.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dockerStart.sh b/dockerStart.sh index 76b1f0a2c..8ad0a4e73 100755 --- a/dockerStart.sh +++ b/dockerStart.sh @@ -33,9 +33,9 @@ if [ -n "$TOKEN" ]; then sed -i "s/^ token:.*/ token: $(echo $TOKEN | sed -e 's/\\/\\\\/g; s/\//\\\//g; s/&/\\\&/g')/" $CONF/appdaemon.yaml fi -# if ENV CERT_VERIFY is set, change the value in appdaemon.yaml -if [ -n "$CERT_VERIFY" ]; then - sed -i "s/^ cert_verify:.*/ cert_verify: $(echo $CERT_VERIFY | sed -e 's/\\/\\\\/g; s/\//\\\//g; s/&/\\\&/g')/" $CONF/appdaemon.yaml +# if ENV HA_CERT_VERIFY is set, change the value in appdaemon.yaml +if [ -n "$HA_CERT_VERIFY" ]; then + sed -i "s/^ cert_verify:.*/ cert_verify: $(echo $HA_CERT_VERIFY | sed -e 's/\\/\\\\/g; s/\//\\\//g; s/&/\\\&/g')/" $CONF/appdaemon.yaml fi # if ENV DASH_URL is set, change the value in appdaemon.yaml