From de5e120042653a94a2f7f61e19553db2f1e8b6ac Mon Sep 17 00:00:00 2001 From: Jokob-sk Date: Wed, 20 Mar 2024 07:24:08 +1100 Subject: [PATCH] roll-back of #593 --- dockerfiles/setup.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/dockerfiles/setup.sh b/dockerfiles/setup.sh index 453ea88c..fdf68eb9 100755 --- a/dockerfiles/setup.sh +++ b/dockerfiles/setup.sh @@ -35,22 +35,22 @@ cp -na "${INSTALL_DIR}/pialert/back/pialert.conf" "${INSTALL_DIR}/pialert/config cp -na "${INSTALL_DIR}/pialert/back/pialert.db" "${FILEDB}" # if custom variables not set we do not need to do anything -# if [ -n "${TZ}" ]; then -# FILECONF="${INSTALL_DIR}/pialert/config/pialert.conf" -# echo "[INSTALL] Setup timezone" -# sed -i "\#^TIMEZONE=#c\TIMEZONE='${TZ}'" "${FILECONF}" -# fi - -# if custom variables not set we do not need to do anything -if [ -n "${TZ}" ]; then - FILECONF=$INSTALL_DIR/pialert/config/pialert.conf - if [ -f "$FILECONF" ]; then - sed -ie "s|Europe/Berlin|${TZ}|g" $INSTALL_DIR/pialert/config/pialert.conf - else - sed -ie "s|Europe/Berlin|${TZ}|g" $INSTALL_DIR/pialert/back/pialert.conf_bak - fi +if [ -n "${TZ}" ]; then + FILECONF="${INSTALL_DIR}/pialert/config/pialert.conf" + echo "[INSTALL] Setup timezone" + sed -i "\#^TIMEZONE=#c\TIMEZONE='${TZ}'" "${FILECONF}" fi +# # if custom variables not set we do not need to do anything +# if [ -n "${TZ}" ]; then +# FILECONF=$INSTALL_DIR/pialert/config/pialert.conf +# if [ -f "$FILECONF" ]; then +# sed -ie "s|Europe/Berlin|${TZ}|g" $INSTALL_DIR/pialert/config/pialert.conf +# else +# sed -ie "s|Europe/Berlin|${TZ}|g" $INSTALL_DIR/pialert/back/pialert.conf_bak +# fi +# fi + echo "[INSTALL] Setup NGINX" echo "Setting webserver to address ($LISTEN_ADDR) and port ($PORT)" envsubst '$INSTALL_DIR $LISTEN_ADDR $PORT' < "${INSTALL_DIR}/pialert/install/pialert.template.conf" > "${NGINX_CONFIG_FILE}"