This commit is contained in:
Jokob-sk
2024-03-19 17:09:54 +11:00
parent b4001f54bb
commit 27a3b9f6c9
3 changed files with 26 additions and 25 deletions

View File

@@ -35,10 +35,20 @@ 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}"
# 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"