summaryrefslogtreecommitdiffstats
path: root/satellit_installer/static_files/system-updates/opt/openslx/dpkg-post.sh
diff options
context:
space:
mode:
Diffstat (limited to 'satellit_installer/static_files/system-updates/opt/openslx/dpkg-post.sh')
-rwxr-xr-xsatellit_installer/static_files/system-updates/opt/openslx/dpkg-post.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/satellit_installer/static_files/system-updates/opt/openslx/dpkg-post.sh b/satellit_installer/static_files/system-updates/opt/openslx/dpkg-post.sh
new file mode 100755
index 0000000..ab07bba
--- /dev/null
+++ b/satellit_installer/static_files/system-updates/opt/openslx/dpkg-post.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+laststamp=$( cat /run/openslx/java-ts 2> /dev/null )
+
+s="$( stat -c %Y /usr/lib/jvm/*/bin/java /usr/lib/jvm/*/lib/jspawnhelper | sort -n | tail -n 1 )"
+
+# Nothing changed?
+[ "$s" = "$laststamp" ] && exit 0
+
+if [ -z "$laststamp" ] || [ "$1" = "--boot" ]; then
+ mkdir -p /run/openslx/
+else
+ systemctl --no-block try-restart dmsd.service taskmanager.service
+fi
+
+echo "$s" > /run/openslx/java-ts
+exit 0