Explorar el Código

Fix error with HTTPS (unset if false)

Joachim M. Giæver hace 3 años
padre
commit
a2f4554b12
Se han modificado 1 ficheros con 8 adiciones y 0 borrados
  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}"