diff options
| author | Simon Rettberg | 2016-04-27 17:16:00 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2016-04-27 17:16:00 +0200 |
| commit | dba9eb00b9957d5ae2e63ec5f7a9534d29a81ae8 (patch) | |
| tree | 3a29ecf50530d65d6aba5bb4d7d010c973fc9838 /remote/modules | |
| parent | [vmware] Disable free disk space checks (diff) | |
| download | tm-scripts-dba9eb00b9957d5ae2e63ec5f7a9534d29a81ae8.tar.gz tm-scripts-dba9eb00b9957d5ae2e63ec5f7a9534d29a81ae8.tar.xz tm-scripts-dba9eb00b9957d5ae2e63ec5f7a9534d29a81ae8.zip | |
[hardware-stats] Count sessions as active when switched to another tty
Diffstat (limited to 'remote/modules')
| -rwxr-xr-x | remote/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update | 2 |
1 files changed, 1 insertions, 1 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 232e5eab..9ab77f4f 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 @@ -14,7 +14,7 @@ USED=0 for SESSION in $(loginctl | awk '{print $1}'); do unset Display Remote State eval $(loginctl -p Display -p Remote -p State -p Class show-session "$SESSION") - if [ -n "$Display" ] && [ "$Remote" = "no" ] && [ "$State" = "active" ] && [ "$Class" = "user" ]; then + if [ -n "$Display" ] && [ "$Remote" = "no" ] && [ "$State" = "active" -o "$State" = "online" ] && [ "$Class" = "user" ]; then USED=1 break; fi |
