summaryrefslogtreecommitdiffstats
path: root/core/modules/hardware-stats/data/opt/openslx/scripts/shutdown-system_usage_update
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/hardware-stats/data/opt/openslx/scripts/shutdown-system_usage_update')
-rwxr-xr-xcore/modules/hardware-stats/data/opt/openslx/scripts/shutdown-system_usage_update12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/modules/hardware-stats/data/opt/openslx/scripts/shutdown-system_usage_update b/core/modules/hardware-stats/data/opt/openslx/scripts/shutdown-system_usage_update
new file mode 100755
index 00000000..dc9f8f73
--- /dev/null
+++ b/core/modules/hardware-stats/data/opt/openslx/scripts/shutdown-system_usage_update
@@ -0,0 +1,12 @@
+#!/bin/ash
+
+. /opt/openslx/config
+[ -z "$SLX_REMOTE_LOG" ] && exit 0
+
+UUID=$(cat /run/system-uuid)
+
+[ -z "$UUID" ] && exit 1
+
+curl -s --data-urlencode "type=~poweroff" --data-urlencode "uuid=$UUID" \
+ "$SLX_REMOTE_LOG" > /dev/null 2>&1
+