summaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
Diffstat (limited to 'installer')
-rwxr-xr-xinstaller/opengnsys_installer.sh11
-rwxr-xr-xinstaller/opengnsys_update.sh12
2 files changed, 3 insertions, 20 deletions
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh
index 2ad18cb8..0da6c226 100755
--- a/installer/opengnsys_installer.sh
+++ b/installer/opengnsys_installer.sh
@@ -1342,15 +1342,6 @@ function servicesCompilation ()
hayErrores=1
fi
popd
- # Compilar OpenGnsys Repository Manager
- echoAndLog "${FUNCNAME}(): Compiling OpenGnsys Repository Manager"
- pushd $WORKDIR/opengnsys/admin/Sources/Services/ogAdmRepo
- make && mv ogAdmRepo $INSTALL_TARGET/sbin
- if [ $? -ne 0 ]; then
- echoAndLog "${FUNCNAME}(): error while compiling OpenGnsys Repository Manager"
- hayErrores=1
- fi
- popd
# Compilar OpenGnsys Agent
echoAndLog "${FUNCNAME}(): Compiling OpenGnsys Agent"
pushd $WORKDIR/opengnsys/admin/Sources/Services/ogAdmAgent
@@ -1502,7 +1493,7 @@ function openGnsysConfigure()
$WORKDIR/opengnsys/admin/Sources/Services/ogAdmServer/ogAdmServer.cfg > $INSTALL_TARGET/etc/ogAdmServer-$dev.cfg
sed -e "s/SERVERIP/${SERVERIP[i]}/g" \
-e "s/REPOKEY/$OPENGNSYS_REPOKEY/g" \
- $WORKDIR/opengnsys/admin/Sources/Services/ogAdmRepo/ogAdmRepo.cfg > $INSTALL_TARGET/etc/ogAdmRepo-$dev.cfg
+ $WORKDIR/opengnsys/repoman/etc/ogAdmRepo.cfg.tmpl > $INSTALL_TARGET/etc/ogAdmRepo-$dev.cfg
sed -e "s/SERVERIP/${SERVERIP[i]}/g" \
-e "s/DBUSER/$OPENGNSYS_DB_USER/g" \
-e "s/DBPASSWORD/$OPENGNSYS_DB_PASSWD/g" \
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh
index 7943d4e2..91505c75 100755
--- a/installer/opengnsys_update.sh
+++ b/installer/opengnsys_update.sh
@@ -937,16 +937,8 @@ function compileServices()
hayErrores=1
fi
popd
- # Compilar OpenGnsys Repository Manager
- echoAndLog "${FUNCNAME}(): Recompiling OpenGnsys Repository Manager"
- pushd $WORKDIR/opengnsys/admin/Sources/Services/ogAdmRepo
- make && moveNewService ogAdmRepo $INSTALL_TARGET/sbin
- if [ $? -ne 0 ]; then
- echoAndLog "${FUNCNAME}(): error while compiling OpenGnsys Repository Manager"
- hayErrores=1
- fi
- popd
- # Actualizar o insertar clave de acceso REST en el fichero de configuración del repositorio.
+ # Parar antiguo servicio de repositorio y añadir clave de acceso REST en su fichero de configuración.
+ pgrep ogAdmRepo > /dev/null && service="ogAdmRepo" $STOPSERVICE
grep -q '^ApiToken=' $INSTALL_TARGET/etc/ogAdmRepo.cfg && \
sed -i "s/^ApiToken=.*$/ApiToken=$REPOKEY/" $INSTALL_TARGET/etc/ogAdmRepo.cfg || \
sed -i "$ a\ApiToken=$REPOKEY/" $INSTALL_TARGET/etc/ogAdmRepo.cfg