summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2020-08-27 12:20:29 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-08-28 15:48:17 +0200
commitf1a09099c075640a6f28c8b4360b7b4bdcf00c93 (patch)
treedc114f7486a2963beb442141d040d37756b70524
parentc7633fdc287ea316e612aa6b612b84f48e719a5c (diff)
#1002 Fix update script to not remove ogAdmRepo.cfg
The ogAdmRepo config file is removed on update. Update script deletes ogAdmRepo.cfg file as it was deprecated, but it is still in use. This patch updates the script to not remove ogAdmRepo config file.
-rwxr-xr-xinstaller/opengnsys_update.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh
index 502e2e9e..0f562335 100755
--- a/installer/opengnsys_update.sh
+++ b/installer/opengnsys_update.sh
@@ -1089,7 +1089,10 @@ function ogServerCompilation()
for serv in ogAdmAgent ogAdmRepo ogAdmServer; do
pgrep $serv > /dev/null && pkill -9 $serv && \
echoAndLog "${FUNCNAME}(): removing deprecated $serv service"
- rm -f $INSTALL_TARGET/sbin/$serv $INSTALL_TARGET/etc/$serv.cfg
+ rm -f $INSTALL_TARGET/sbin/$serv
+ if [ $serv != ogAdmRepo ]; then
+ rm -f $INSTALL_TARGET/etc/$serv.cfg
+ fi
done
# Generating an ogServer API token, if it does not exist
grep -q "APITOKEN=" $INSTALL_TARGET/etc/ogserver.cfg || \