roll-back of #593

This commit is contained in:
Jokob-sk
2024-03-20 07:24:08 +11:00
parent d72812d280
commit de5e120042

View File

@@ -34,23 +34,23 @@ fi
cp -na "${INSTALL_DIR}/pialert/back/pialert.conf" "${INSTALL_DIR}/pialert/config/pialert.conf" cp -na "${INSTALL_DIR}/pialert/back/pialert.conf" "${INSTALL_DIR}/pialert/config/pialert.conf"
cp -na "${INSTALL_DIR}/pialert/back/pialert.db" "${FILEDB}" 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 custom variables not set we do not need to do anything
if [ -n "${TZ}" ]; then if [ -n "${TZ}" ]; then
FILECONF=$INSTALL_DIR/pialert/config/pialert.conf FILECONF="${INSTALL_DIR}/pialert/config/pialert.conf"
if [ -f "$FILECONF" ]; then echo "[INSTALL] Setup timezone"
sed -ie "s|Europe/Berlin|${TZ}|g" $INSTALL_DIR/pialert/config/pialert.conf sed -i "\#^TIMEZONE=#c\TIMEZONE='${TZ}'" "${FILECONF}"
else
sed -ie "s|Europe/Berlin|${TZ}|g" $INSTALL_DIR/pialert/back/pialert.conf_bak
fi
fi 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 "[INSTALL] Setup NGINX"
echo "Setting webserver to address ($LISTEN_ADDR) and port ($PORT)" 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}" envsubst '$INSTALL_DIR $LISTEN_ADDR $PORT' < "${INSTALL_DIR}/pialert/install/pialert.template.conf" > "${NGINX_CONFIG_FILE}"