Fixing bug in ogprovision
oginstaller/pipeline/head This commit looks good Details

move-to-docker
Nicolas Arenas 2024-11-06 12:28:07 +01:00
parent de804581b2
commit 3f270e07d4
1 changed files with 5 additions and 4 deletions

View File

@ -8,10 +8,10 @@ ENV_FILE=$ENV_DIR/.env
mkdir -p $ENV_DIR
# Comprobar si ya se ha instalado ogCore
#if [ -f /opt/opengnsys/ogGui/installer/.deployed ]; then
# echo "ogCore ya instalado"
# exit 0
#fi
if [ -f /opt/opengnsys/ogGui/installer/.deployed ]; then
echo "ogCore ya instalado"
exit 0
fi
# Sacar la IP del ogCore de la configuración
ogcore_ip=$(jq -r '.ogcore_ip' /opt/opengnsys/ogGui/installer/config.json)
@ -28,6 +28,7 @@ if [ -z "$ogcore_ip" ]; then
ogcore_ip=$ip_address
# Si no se ha configurado la IP del ogCore, se escribe en el fichero .env
echo "NG_APP_BASE_API_URL=https://$ogcore_ip:8443" > $ENV_FILE
touch /opt/opengnsys/ogGui/installer/.deployed
exit 0
else
echo "No se pudo determinar el interfaz asociado a la ruta por defecto."