1
0
Fork 0
mirror of https://github.com/overleaf/toolkit.git synced 2025-04-19 15:28:06 +02:00

prevents unbound var error with NGINX_ENABLED

This commit is contained in:
Miguel Serrano 2021-07-12 16:49:46 +02:00
parent 2c5bbb55a2
commit e04f08ce8b

View file

@ -73,6 +73,13 @@ function __main__() {
SHARELATEX_DATA_PATH=$(cd "$TOOLKIT_ROOT"; realpath "$SHARELATEX_DATA_PATH")
MONGO_DATA_PATH=$(cd "$TOOLKIT_ROOT"; realpath "$MONGO_DATA_PATH")
REDIS_DATA_PATH=$(cd "$TOOLKIT_ROOT"; realpath "$REDIS_DATA_PATH")
# users with old config/ content might not have NGINX_ENABLED in their
# variables.env, this initialisation prevents an `unbound variable` error
if [ -z ${NGINX_ENABLED+x} ];
then
NGINX_ENABLED="false"
fi
if [[ "$NGINX_ENABLED" == "true" ]]; then
if [[ -n "${TLS_PRIVATE_KEY_PATH-}" ]]; then