summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rwxr-xr-xcore/modules/idleaction/data/opt/openslx/scripts/idle-daemon-launcher11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/modules/idleaction/data/opt/openslx/scripts/idle-daemon-launcher b/core/modules/idleaction/data/opt/openslx/scripts/idle-daemon-launcher
index 98168436..640ef9fb 100755
--- a/core/modules/idleaction/data/opt/openslx/scripts/idle-daemon-launcher
+++ b/core/modules/idleaction/data/opt/openslx/scripts/idle-daemon-launcher
@@ -6,6 +6,17 @@ CMD=
[ -n "$SLX_SHUTDOWN_TIMEOUT" ] && CMD="$CMD --poweroff-timeout $SLX_SHUTDOWN_TIMEOUT"
+if [ -n "${SLX_AUTOLOGIN%OFF}" ]; then
+ # Autologin is enabled - special case logout timeout, which should turn into
+ # a shutdown.
+ if [ -n "$SLX_SHUTDOWN_TIMEOUT" ] && [ -n "$SLX_LOGOUT_TIMEOUT" ] && [ "$SLX_SHUTDOWN_TIMEOUT" -gt "$SLX_LOGOUT_TIMEOUT" ]; then
+ SLX_LOGOUT_TIMEOUT="$SLX_SHUTDOWN_TIMEOUT"
+ fi
+ if [ -n "$SLX_LOGOUT_TIMEOUT" ]; then
+ CMD="$CMD --logout-is-shutdown"
+ fi
+fi
+
if [ -z "${SLX_EXAM}" ]; then
# Exam mode inactive
[ -n "$SLX_LOGOUT_TIMEOUT" ] && CMD="$CMD --logout-timeout $SLX_LOGOUT_TIMEOUT"