summaryrefslogtreecommitdiffstats
path: root/core/modules/hardware-stats/data/opt/openslx/pam/hooks/session-open.d/usage_stats
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/hardware-stats/data/opt/openslx/pam/hooks/session-open.d/usage_stats')
-rw-r--r--core/modules/hardware-stats/data/opt/openslx/pam/hooks/session-open.d/usage_stats6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/modules/hardware-stats/data/opt/openslx/pam/hooks/session-open.d/usage_stats b/core/modules/hardware-stats/data/opt/openslx/pam/hooks/session-open.d/usage_stats
index e2154aa7..0c287f04 100644
--- a/core/modules/hardware-stats/data/opt/openslx/pam/hooks/session-open.d/usage_stats
+++ b/core/modules/hardware-stats/data/opt/openslx/pam/hooks/session-open.d/usage_stats
@@ -1,9 +1,7 @@
#!/bin/ash - sourced
-if [ "x$PAM_SERVICE" != "xsu" -a "x$PAM_SERVICE" != "xsudo" ]; then
- sleep 3
+if [ "$DISPLAY" = ":0" ] || [ "$PAM_TTY" = ":0" ]; then
+ sleep 4
/opt/openslx/scripts/cron-system_usage_update
fi &
-true
-