diff options
| author | Simon Rettberg | 2015-12-11 10:23:57 +0100 |
|---|---|---|
| committer | Simon Rettberg | 2015-12-11 10:23:57 +0100 |
| commit | 4571c66d385a59a4b43e7ee37977e9475c388bbf (patch) | |
| tree | b95495ac502d0f50f1c1762bee82a1b2fa26345a /remote/modules/hardware-stats | |
| parent | [pvs2] Remove xsession from custom displaymanager path (diff) | |
| download | tm-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')
| -rwxr-xr-x | remote/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update | 4 |
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 |
