summaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2019-05-16 11:43:48 +0200
committerRamón M. Gómez <ramongomez@us.es>2019-05-16 11:43:48 +0200
commit4f64fa1837ed2cdfcb3555948ffbbc45ad4db70b (patch)
treea3bf381230763e791e0b65209fed18f41b24f439 /installer
parent97b8472e4a395a35ec0cc2d2dc1550fb9c378348 (diff)
#912: Fix bugs in update script: generating a new repository access token and uncompressing downloaded code; update closed tickets list.
Diffstat (limited to 'installer')
-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 2fcd3be8..826e9b89 100755
--- a/installer/opengnsys_update.sh
+++ b/installer/opengnsys_update.sh
@@ -302,7 +302,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!!"
@@ -430,7 +429,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
@@ -825,6 +827,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