summaryrefslogtreecommitdiffstats
path: root/installer/opengnsys_update.sh
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2019-05-16 11:49:27 +0200
committerRamón M. Gómez <ramongomez@us.es>2019-05-16 11:49:27 +0200
commit841632e596422b692e60294fbdc425c40ec26c60 (patch)
tree185b6c1ff190f4aba457f8454ab361eb19e69551 /installer/opengnsys_update.sh
parenta49bcdc6d4381cb893acfd0d73938e927c87363d (diff)
#912: Adapting commit {{{4f64fa1}}} from devel branch.
Diffstat (limited to 'installer/opengnsys_update.sh')
-rwxr-xr-xinstaller/opengnsys_update.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh
index 22b9c02d..6e079581 100755
--- a/installer/opengnsys_update.sh
+++ b/installer/opengnsys_update.sh
@@ -289,7 +289,6 @@ function importSqlFile()
local mycnf=/tmp/.my.cnf.$$
local status
local APIKEY=$(php -r 'echo md5(uniqid(rand(), true));')
- REPOKEY=$(php -r 'echo md5(uniqid(rand(), true));')
if [ ! -r $sqlfile ]; then
errorAndLog "${FUNCNAME}(): Unable to read $sqlfile!!"
@@ -395,7 +394,10 @@ function downloadCode()
echoAndLog "${FUNCNAME}(): downloading code..."
- curl "${url}" -o opengnsys.zip && unzip opengnsys.zip && mv "OpenGnsys-$BRANCH" opengnsys
+ curl "${url}" -o opengnsys.zip && \
+ unzip -qo opengnsys.zip && \
+ rm -fr opengnsys && \
+ mv "OpenGnsys-$BRANCH" opengnsys
if [ $? -ne 0 ]; then
errorAndLog "${FUNCNAME}(): error getting code from ${url}, verify your user and password"
return 1
@@ -778,6 +780,7 @@ function updateDatabase()
fi
popd >/dev/null
+ REPOKEY=$(php -r 'echo md5(uniqid(rand(), true));')
if [ -n "$FILES" ]; then
for file in $FILES; do
importSqlFile $OPENGNSYS_DBUSER $OPENGNSYS_DBPASSWORD $OPENGNSYS_DATABASE $DBDIR/$file