summaryrefslogtreecommitdiffstats
path: root/remote/modules/hardware-stats/data
diff options
context:
space:
mode:
authorSimon Rettberg2015-12-11 10:23:57 +0100
committerSimon Rettberg2015-12-11 10:23:57 +0100
commit4571c66d385a59a4b43e7ee37977e9475c388bbf (patch)
treeb95495ac502d0f50f1c1762bee82a1b2fa26345a /remote/modules/hardware-stats/data
parent[pvs2] Remove xsession from custom displaymanager path (diff)
downloadtm-scripts-4571c66d385a59a4b43e7ee37977e9475c388bbf.tar.gz
tm-scripts-4571c66d385a59a4b43e7ee37977e9475c388bbf.tar.xz
tm-scripts-4571c66d385a59a4b43e7ee37977e9475c388bbf.zip
[hardware-stats] Consider only user sessions to determine "in use" state
Diffstat (limited to 'remote/modules/hardware-stats/data')
-rwxr-xr-xremote/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update4
1 files changed, 2 insertions, 2 deletions
diff --git a/remote/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update b/remote/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update
index b1ab4e2d..232e5eab 100755
--- a/remote/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update
+++ b/remote/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update
@@ -13,8 +13,8 @@ USED=0
for SESSION in $(loginctl | awk '{print $1}'); do
unset Display Remote State
- eval $(loginctl -p Display -p Remote -p State show-session "$SESSION")
- if [ -n "$Display" ] && [ "$Remote" = "no" ] && [ "$State" = "active" ]; then
+ eval $(loginctl -p Display -p Remote -p State -p Class show-session "$SESSION")
+ if [ -n "$Display" ] && [ "$Remote" = "no" ] && [ "$State" = "active" ] && [ "$Class" = "user" ]; then
USED=1
break;
fi