Pārlūkot izejas kodu

Fix error with HTTPS (unset if false)

Joachim M. Giæver 3 gadi atpakaļ
vecāks
revīzija
a2f4554b12
1 mainītis faili ar 8 papildinājumiem un 0 dzēšanām
  1. 8 0
      src/helper/env-wrapper

+ 8 - 0
src/helper/env-wrapper

@@ -83,8 +83,16 @@ export SERVER_HOST=$(snapctl get server.host)
 export SERVER_PORT=$(snapctl get server.port)
 export SERVER_URL=$(snapctl get server.url)
 export SERVER_WS_URL=$(snapctl get server.ws-url)
+
 export GIT_DIR="${SNAP}/usr/lib/zwavejs2mqtt/.git"
 
+export HTTPS="${SERVER_SSL}"
+
+if [ "${HTTPS}" != "true" ]; then
+    unset HTTPS
+    unset SERVER_SSL
+fi
+
 export HOST="${SERVER_HOST}"
 export PORT="${SERVER_PORT}"