Compare commits

...

4 Commits

Author SHA1 Message Date
Manuel Aranda Rosales 3d2f9dfa5e Merge branch 'main' into develop
testing/ogGui-multibranch/pipeline/pr-main Build queued... Details
testing/ogGui-multibranch/pipeline/head There was a failure building this commit Details
2025-05-19 16:58:05 +02:00
Nicolas Arenas f41cbf2cef Adding oggui postinst debug
oggui-debian-package/pipeline/head This commit looks good Details
2025-05-14 06:12:46 +02:00
Nicolas Arenas b82f139c9d Adding oggui postinst debug
oggui-debian-package/pipeline/head This commit looks good Details
2025-05-14 06:04:51 +02:00
Manuel Aranda Rosales bad345c2fd Merge pull request 'develop' (#22) from develop into main
oggui-debian-package/pipeline/head This commit looks good Details
oggui-debian-package/pipeline/tag This commit looks good Details
Reviewed-on: #22
2025-05-13 08:37:13 +02:00
1 changed files with 2 additions and 5 deletions

View File

@ -1,6 +1,7 @@
#!/bin/bash
set -e
set -x
. /usr/share/debconf/confmodule
@ -34,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/
@ -52,7 +50,6 @@ elif [ "$1" = "configure" ] && [ -n "$2" ]; then
echo ">>> Backup de archivos de configuración reales en /opt/opengnsys"
restore_config_if_modified "/opt/opengnsys/oggui/etc/nginx/oggui.conf"
restore_config_if_modified "$CONFIG_FILE"
fi
# Cambiar la propiedad de los archivos al usuario especificado