From 4571c66d385a59a4b43e7ee37977e9475c388bbf Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 11 Dec 2015 10:23:57 +0100 Subject: [hardware-stats] Consider only user sessions to determine "in use" state --- .../hardware-stats/data/opt/openslx/scripts/cron-system_usage_update | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'remote') 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 -- cgit v1.2.3-55-g7522