summaryrefslogtreecommitdiffstats
path: root/installer/opengnsys_update.sh
diff options
context:
space:
mode:
Diffstat (limited to 'installer/opengnsys_update.sh')
-rwxr-xr-xinstaller/opengnsys_update.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh
index 8ca4dfff..4f1ea042 100755
--- a/installer/opengnsys_update.sh
+++ b/installer/opengnsys_update.sh
@@ -977,6 +977,20 @@ function updateServerFiles()
$STARTSERVICE
NEWFILES="$NEWFILES /etc/init.d/opengnsys"
fi
+ if ! diff -q \
+ $WORKDIR/opengnsys/admin/Sources/Services/opengnsys.service \
+ /lib/systemd/system/opengnsys.service 2>/dev/null; then
+ echoAndLog "${FUNCNAME}(): updating new service file"
+ backupFile /lib/systemd/system/opengnsys.service
+ service="opengnsys"
+ $STOPSERVICE
+ cp -a \
+ $WORKDIR/opengnsys/admin/Sources/Services/opengnsys.service \
+ /lib/systemd/system/opengnsys.service
+ systemctl daemon-reload
+ $STARTSERVICE
+ NEWFILES="$NEWFILES /lib/systemd/system/opengnsys.service"
+ fi
if ! diff -q $WORKDIR/opengnsys/admin/Sources/Services/opengnsys.default /etc/default/opengnsys >/dev/null; then
echoAndLog "${FUNCNAME}(): updating new default file"
backupFile /etc/default/opengnsys