summaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
Diffstat (limited to 'installer')
-rwxr-xr-xinstaller/pkg-generator/DEBIAN/postinst25
-rwxr-xr-xinstaller/pkg-generator/tmp/opengnsys_installer/opengnsys_git_update.sh3
2 files changed, 17 insertions, 11 deletions
diff --git a/installer/pkg-generator/DEBIAN/postinst b/installer/pkg-generator/DEBIAN/postinst
index 19b30e76..35890e0d 100755
--- a/installer/pkg-generator/DEBIAN/postinst
+++ b/installer/pkg-generator/DEBIAN/postinst
@@ -1255,24 +1255,31 @@ db_go || true
####### Proceso de instalaciĆ³n de OpenGnsys
#####################################################################
-# test if it is already installed
+# test if it is already installed using old installer script
+
+VFILE=/opt/opengnsys/doc/VERSION.txt
+if [ -f $VFILE ]; then
+ echo "File $VFILE exists. This could mean that OpenGnsys has been previously"
+ echo "installed using the installer script. This apt package is not suitable"
+ echo "for upgrading and may break the system. If you are shure what you are"
+ echo "doing you could delete or rename that file and try again"
+ echo "Terminating!"
+ exit 1
+fi
+
+# test if it is already installed using new debian packake
+
db_get opengnsys-full/OPENGNSYS_IS_INSTALLED
if [ "$RET" = "true" ]; then
echo "Opengnsys already installed; Updating"
/tmp/opengnsys_installer/opengnsys_git_update.sh
+ if [ $? -eq 0 ]; then
echo "Updated!!"
exit 0
+ fi
fi
-VFILE=/opt/opengnsys/doc/VERSION.txt
-if [ -f $VFILE ]; then
- echo "File $FILE exists. This could mean that OpenGnsys has been previously"
- echo "installed using the installer script. This apt package is not suitable"
- echo "for upgrading and may break the system"
- echo "Terminating!"
- exit 1
-fi
echoAndLog "OpenGnsys installation begins at $(date)"
pushd $WORKDIR
diff --git a/installer/pkg-generator/tmp/opengnsys_installer/opengnsys_git_update.sh b/installer/pkg-generator/tmp/opengnsys_installer/opengnsys_git_update.sh
index 05827c93..b49d3d8b 100755
--- a/installer/pkg-generator/tmp/opengnsys_installer/opengnsys_git_update.sh
+++ b/installer/pkg-generator/tmp/opengnsys_installer/opengnsys_git_update.sh
@@ -933,7 +933,6 @@ autoConfigure
ln -fs "$(dirname $PROGRAMDIR)" opengnsys
-
# Comprobar configuraciĆ³n de MySQL.
checkMysqlConfig $OPENGNSYS_DBUSER $OPENGNSYS_DBPASSWORD
@@ -986,4 +985,4 @@ updateSummary
echoAndLog "OpenGnsys update finished at $(date)"
popd
-
+return 0