summaryrefslogtreecommitdiffstats
path: root/remote/modules
diff options
context:
space:
mode:
authorSimon Rettberg2015-12-07 16:40:56 +0100
committerSimon Rettberg2015-12-07 16:40:56 +0100
commit188e52c9f63fc21b3d3b6376c7092b1f7b11150a (patch)
treee2b95cc1b410c7390d701365fae7c9e5c4921ada /remote/modules
parent[run-virt] unmount dnbd3-fuse on exit (diff)
downloadtm-scripts-188e52c9f63fc21b3d3b6376c7092b1f7b11150a.tar.gz
tm-scripts-188e52c9f63fc21b3d3b6376c7092b1f7b11150a.tar.xz
tm-scripts-188e52c9f63fc21b3d3b6376c7092b1f7b11150a.zip
[hardware-stats] Fix usage stats updater
Diffstat (limited to 'remote/modules')
-rwxr-xr-xremote/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update9
1 files changed, 5 insertions, 4 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 889409d9..630c8729 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
@@ -1,5 +1,8 @@
#!/bin/ash
+. /opt/openslx/config
+[ -z "$SLX_REMOTE_LOG" ] && exit 0
+
UUID=$(cat /run/system-uuid)
[ -z "$UUID" ] && exit 1
@@ -15,8 +18,6 @@ for SESSION in $(loginctl | awk '{print $1}'); do
fi
done
-# TODO UUID
-
-curl --data-urlencode "type=~runstate" --data-urlencode "uuid=$UUID" --data-urlencode "used=$USED" \
- "$SLX_REMOTE_LOG"
+curl -s --data-urlencode "type=~runstate" --data-urlencode "uuid=$UUID" --data-urlencode "used=$USED" \
+ "$SLX_REMOTE_LOG" > /dev/null 2>&1