From f41cbf2cef660d96f86a37a8d47417daec12b299 Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Wed, 14 May 2025 06:12:46 +0200 Subject: [PATCH] Adding oggui postinst debug --- debian/oggui.postinst | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/debian/oggui.postinst b/debian/oggui.postinst index 0ba051d..0346f22 100644 --- a/debian/oggui.postinst +++ b/debian/oggui.postinst @@ -35,10 +35,7 @@ restore_config_if_modified() { # Detectar si es una instalación nueva o una actualización if [ "$1" = "configure" ] && [ -z "$2" ]; then - if [ ! -f "$CONFIG_FILE" ]; then - jq --arg apiUrl "$OGCORE_URL" --arg mercureUrl "$OGMERCURE_URL" \ - '.apiUrl = $apiUrl | .mercureUrl = $mercureUrl' "$CONFIG_FILE" > "${CONFIG_FILE}.tmp" && mv "${CONFIG_FILE}.tmp" "$CONFIG_FILE" - fi + jq --arg apiUrl "$OGCORE_URL" --arg mercureUrl "$OGMERCURE_URL" '.apiUrl = $apiUrl | .mercureUrl = $mercureUrl' "$CONFIG_FILE" > "${CONFIG_FILE}.tmp" && mv "${CONFIG_FILE}.tmp" "$CONFIG_FILE" ln -s /opt/opengnsys/oggui/etc/nginx/oggui.conf /etc/nginx/sites-enabled/oggui.conf ln -s $CONFIG_FILE /opt/opengnsys/oggui/etc/config.json mkdir -p /etc/nginx/certs/