summaryrefslogtreecommitdiffstats
path: root/installer/opengnsys_installer.sh
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2019-10-16 12:18:22 +0200
committerRamón M. Gómez <ramongomez@us.es>2019-10-16 12:18:22 +0200
commitdde2db1684454f535bb8d331e31bd5ea9b9641a6 (patch)
tree5c11da747071cc3709315f4df4173b3ad2dee482 /installer/opengnsys_installer.sh
parent436abc7095b6d72df74c4193b5051c2b9399b325 (diff)
#925: Only the installer uses {{{settoken}}} script to generate authentication tokens.
Diffstat (limited to 'installer/opengnsys_installer.sh')
-rwxr-xr-xinstaller/opengnsys_installer.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh
index f359f369..0a11415b 100755
--- a/installer/opengnsys_installer.sh
+++ b/installer/opengnsys_installer.sh
@@ -692,9 +692,6 @@ function mysqlImportSqlFileToDb()
local i=0
local dev=""
local status
- # Claves aleatorias para acceso a las APIs REST.
- local OPENGNSYS_APIKEY=$(php -r 'echo md5(uniqid(rand(), true));')
- OPENGNSYS_REPOKEY=$(php -r 'echo md5(uniqid(rand(), true));')
if [ ! -f $sqlfile ]; then
errorAndLog "${FUNCNAME}(): Unable to locate $sqlfile!!"
@@ -708,8 +705,6 @@ function mysqlImportSqlFileToDb()
sed -e "s/SERVERIP/${SERVERIP[i]}/g" \
-e "s/DBUSER/$OPENGNSYS_DB_USER/g" \
-e "s/DBPASSWORD/$OPENGNSYS_DB_PASSWD/g" \
- -e "s/APIKEY/$OPENGNSYS_APIKEY/g" \
- -e "s/REPOKEY/$OPENGNSYS_REPOKEY/g" \
$sqlfile > $tmpfile
fi
let i++
@@ -1494,10 +1489,8 @@ 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" \
$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" \
@@ -1546,9 +1539,16 @@ EOT
$DISABLESERVICE
fi
- echoAndLog "${FUNCNAME}(): Starting OpenGnsys services."
+ # Actualizar tokens de autenticación e iniciar los servicios.
service="opengnsys"
- $ENABLESERVICE; $STARTSERVICE
+ $ENABLESERVICE
+ if [ -x $INSTALL_TARGET/bin/settoken ]; then
+ echoAndLog "${FUNCNAME}(): Setting authentication tokens and starting OpenGnsys services."
+ $INSTALL_TARGET/bin/settoken -f
+ else
+ echoAndLog "${FUNCNAME}(): Starting OpenGnsys services."
+ $STARTSERVICE
+ fi
}
@@ -1582,7 +1582,7 @@ function installationSummary()
echoAndLog "Repository directory: $INSTALL_TARGET/images"
echoAndLog "DHCP configuration directory: $DHCPCFGDIR"
echoAndLog "TFTP configuration directory: $TFTPCFGDIR"
- echoAndLog "Installed ogLive client(s): $(oglivecli list | awk '{print $2}')"
+ echoAndLog "Installed ogLive client: $(oglivecli list | awk '{print $2}')"
echoAndLog "Samba configuration directory: $SAMBACFGDIR"
echoAndLog "Web Console URL: $OPENGNSYS_CONSOLEURL"
echoAndLog "Web Console access data: entered by the user"