summaryrefslogtreecommitdiffstats
path: root/satellit_upgrader/updater.template.sh
diff options
context:
space:
mode:
Diffstat (limited to 'satellit_upgrader/updater.template.sh')
-rw-r--r--satellit_upgrader/updater.template.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh
index f71846d..1756bc6 100644
--- a/satellit_upgrader/updater.template.sh
+++ b/satellit_upgrader/updater.template.sh
@@ -506,9 +506,11 @@ if [ -n "$TGZ_SLXADMIN" ]; then
rm -f -- "/srv/openslx/www/slx-admin/modules-available/baseconfig_bwidm/baseconfig/settings.json"
ln -s "${PATH_SLXADMINCACHE}/baseconfig-bwidm_settings.json" /srv/openslx/www/slx-admin/modules-available/baseconfig_bwidm/baseconfig/settings.json || \
pwarning "Could not set link ${PATH_SLXADMINCACHE}/baseconfig-bwidm_settings.json to /srv/openslx/www/slx-admin/modules-available/baseconfig_bwidm/baseconfig/settings.json - do so manually if you need bwIDM login on client computers"
- # run init script
- if [ -s "$FILEDIR/slxadmin-init/slxadmin-init.php" ]; then
- php "$FILEDIR/slxadmin-init/slxadmin-init.php" || perror "Error running slx-admin init script"
+ # update init script
+ if [ -d "${FILEDIR}/slxadmin-init" ]; then
+ rm -rf -- /opt/openslx/restore.d/slxadmin-init
+ mkdir -p /opt/openslx/restore.d || perror "Could not create /opt/openslx/restore.d"
+ cp -a "${FILEDIR}/slxadmin-init" /opt/openslx/restore.d/
fi
echo "Web interface upgrade complete"
fi
@@ -851,6 +853,12 @@ for service in "${!restart[@]}"; do
restart_service "$service"
done
+# Run all post-restore scripts
+for i in /opt/openslx/restore.d/*/init.sh; do
+ [ -x "$i" ] || continue
+ "$i" || pwarning "ERROR running post-restore script $i: $?"
+done
+
# Patch the update version in /etc/motd
sed -r -i 's/(bwLehrpool\sSatelliten-Server,\sVersion\s[WS]Sem20[12][0-9]\s[1-9]\.[0-9])(\s\[Update\s[0-9]\.[0-9][a-z]?\])?/\1 \[Update '"${SLXADMIN_FOOTER//v/}"'\]/g' /etc/motd