summaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2020-04-21 13:42:21 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-06-02 12:32:36 +0200
commit4816ea56b0dbdf230c0db685bb6924da157b2c56 (patch)
tree6bf36280bcace52e49bf4ec2737a7af353834132 /installer
parent646ef927780280c15ca91ec08d04fbfaa876c65f (diff)
#971 Remove ogAdmAgent initialization
All the functionalities of the ogAdmAgent are now in the ogAdmServer. So, the it is not needed anymore. This commit remove the installation and update of the ogAdmAgent, adds a check to remove it if exists and removes it from the OpenGnsys init script. A future patch will remove all the code related to the ogAdmAgent.
Diffstat (limited to 'installer')
-rwxr-xr-xinstaller/opengnsys_installer.sh15
-rwxr-xr-xinstaller/opengnsys_update.sh19
2 files changed, 8 insertions, 26 deletions
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh
index 9954c53d..2553ab76 100755
--- a/installer/opengnsys_installer.sh
+++ b/installer/opengnsys_installer.sh
@@ -1334,15 +1334,6 @@ function servicesCompilation ()
hayErrores=1
fi
popd
- # Compilar OpenGnsys Agent
- echoAndLog "${FUNCNAME}(): Compiling OpenGnsys Agent"
- pushd $WORKDIR/opengnsys/admin/Sources/Services/ogAdmAgent
- make && mv ogAdmAgent $INSTALL_TARGET/sbin
- if [ $? -ne 0 ]; then
- echoAndLog "${FUNCNAME}(): error while compiling OpenGnsys Agent"
- hayErrores=1
- fi
- popd
return $hayErrores
}
@@ -1499,11 +1490,6 @@ function openGnsysConfigure()
$WORKDIR/opengnsys/admin/Sources/Services/ogAdmServer/ogAdmServer.cfg > $INSTALL_TARGET/etc/ogAdmServer-$dev.cfg
sed -e "s/SERVERIP/${SERVERIP[i]}/g" \
$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" \
- -e "s/DATABASE/$OPENGNSYS_DATABASE/g" \
- $WORKDIR/opengnsys/admin/Sources/Services/ogAdmAgent/ogAdmAgent.cfg > $INSTALL_TARGET/etc/ogAdmAgent-$dev.cfg
CONSOLEURL="https://${SERVERIP[i]}/opengnsys"
sed -e "s/SERVERIP/${SERVERIP[i]}/g" \
-e "s/DBUSER/$OPENGNSYS_DB_USER/g" \
@@ -1520,7 +1506,6 @@ function openGnsysConfigure()
done
ln -f $INSTALL_TARGET/etc/ogAdmServer-$DEFAULTDEV.cfg $INSTALL_TARGET/etc/ogAdmServer.cfg
ln -f $INSTALL_TARGET/etc/ogAdmRepo-$DEFAULTDEV.cfg $INSTALL_TARGET/etc/ogAdmRepo.cfg
- ln -f $INSTALL_TARGET/etc/ogAdmAgent-$DEFAULTDEV.cfg $INSTALL_TARGET/etc/ogAdmAgent.cfg
ln -f $INSTALL_TARGET/www/controlacceso-$DEFAULTDEV.php $INSTALL_TARGET/www/controlacceso.php
# Configuración del motor de clonación.
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh
index 21587723..8ca4dfff 100755
--- a/installer/opengnsys_update.sh
+++ b/installer/opengnsys_update.sh
@@ -55,8 +55,6 @@ fi
# Cargar configuración de acceso a la base de datos.
if [ -r $INSTALL_TARGET/etc/ogAdmServer.cfg ]; then
source $INSTALL_TARGET/etc/ogAdmServer.cfg
-elif [ -r $INSTALL_TARGET/etc/ogAdmAgent.cfg ]; then
- source $INSTALL_TARGET/etc/ogAdmAgent.cfg
fi
OPENGNSYS_DATABASE=${OPENGNSYS_DATABASE:-"$CATALOG"} # Base de datos
OPENGNSYS_DBUSER=${OPENGNSYS_DBUSER:-"$USUARIO"} # Usuario de acceso
@@ -972,7 +970,11 @@ function updateServerFiles()
if ! diff -q $WORKDIR/opengnsys/admin/Sources/Services/opengnsys.init /etc/init.d/opengnsys 2>/dev/null; then
echoAndLog "${FUNCNAME}(): updating new init file"
backupFile /etc/init.d/opengnsys
+ service="opengnsys"
+ $STOPSERVICE
cp -a $WORKDIR/opengnsys/admin/Sources/Services/opengnsys.init /etc/init.d/opengnsys
+ systemctl daemon-reload
+ $STARTSERVICE
NEWFILES="$NEWFILES /etc/init.d/opengnsys"
fi
if ! diff -q $WORKDIR/opengnsys/admin/Sources/Services/opengnsys.default /etc/default/opengnsys >/dev/null; then
@@ -1056,15 +1058,10 @@ function compileServices()
popd
# Parar antiguo servicio de repositorio.
pgrep ogAdmRepo > /dev/null && service="ogAdmRepo" $STOPSERVICE
- # Compilar OpenGnsys Agent
- echoAndLog "${FUNCNAME}(): Recompiling OpenGnsys Server Agent"
- pushd $WORKDIR/opengnsys/admin/Sources/Services/ogAdmAgent
- make && moveNewService ogAdmAgent $INSTALL_TARGET/sbin
- if [ $? -ne 0 ]; then
- echoAndLog "${FUNCNAME}(): error while compiling OpenGnsys Server Agent"
- hayErrores=1
- fi
- popd
+ # Remove OpenGnsys Agent (ogAdmAgent)
+ echoAndLog "${FUNCNAME}(): deleting deprecated OpenGnsys Agent"
+ [ -e $INSTALL_TARGET/sbin/ogAdmAgent ] && \
+ rm -f $INSTALL_TARGET/sbin/ogAdmAgent
# Compilar OpenGnsys Client
echoAndLog "${FUNCNAME}(): Recompiling OpenGnsys Client"