diff options
-rw-r--r-- | admin/Sources/Services/ogAdmServer/ogAdmServer.cfg | 1 | ||||
-rwxr-xr-x | installer/opengnsys_installer.sh | 1 | ||||
-rwxr-xr-x | installer/opengnsys_update.sh | 1 | ||||
-rwxr-xr-x | server/bin/setserveraddr | 1 |
4 files changed, 4 insertions, 0 deletions
diff --git a/admin/Sources/Services/ogAdmServer/ogAdmServer.cfg b/admin/Sources/Services/ogAdmServer/ogAdmServer.cfg index 07d7d972..790b2336 100644 --- a/admin/Sources/Services/ogAdmServer/ogAdmServer.cfg +++ b/admin/Sources/Services/ogAdmServer/ogAdmServer.cfg @@ -5,3 +5,4 @@ PASSWORD=DBPASSWORD datasource=localhost CATALOG=DATABASE INTERFACE=eth0 +APITOKEN=REPOKEY diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index b62b0f50..0634ea34 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -1491,6 +1491,7 @@ function openGnsysConfigure() -e "s/DBUSER/$OPENGNSYS_DB_USER/g" \ -e "s/DBPASSWORD/$OPENGNSYS_DB_PASSWD/g" \ -e "s/DATABASE/$OPENGNSYS_DATABASE/g" \ + -e "s/REPOKEY/$OPENGNSYS_REPOKEY/g" \ $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" \ diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index f8cee6eb..92dea9a9 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -981,6 +981,7 @@ function compileServices() # 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 sed -i -n -e "/^ApiToken=/!p" -e "$ a\ApiToken=$REPOKEY/" $INSTALL_TARGET/etc/ogAdmRepo.cfg + sed -i -n -e "/^APITOKEN=/!p" -e "$ a\APITOKEN=$REPOKEY/" $INSTALL_TARGET/etc/ogAdmServer.cfg # Compilar OpenGnsys Agent echoAndLog "${FUNCNAME}(): Recompiling OpenGnsys Server Agent" pushd $WORKDIR/opengnsys/admin/Sources/Services/ogAdmAgent diff --git a/server/bin/setserveraddr b/server/bin/setserveraddr index eb52d64d..cca279b8 100755 --- a/server/bin/setserveraddr +++ b/server/bin/setserveraddr @@ -120,6 +120,7 @@ if [ -n "$SERVERIP" ]; then if [ "$RUN_OGADMREPO" == "yes" ]; then REPOKEY=$(php -r 'echo md5(uniqid(rand(), true));') sed -i -e "s/ApiToken=.*/ApiToken=$REPOKEY/" $OPENGNSYS/etc/ogAdmRepo.cfg + sed -i -e "s/APITOKEN=.*/APITOKEN=$REPOKEY/" $OPENGNSYS/etc/ogAdmServer.cfg fi # If OpenGnsys Server is active, updating the database. if [ "$RUN_OGADMSERVER" == "yes" ]; then |