diff options
Diffstat (limited to 'remote/modules/hardware-stats/data/opt/openslx/scripts')
| -rwxr-xr-x | remote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/remote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats b/remote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats index 6a3829e5..81db23a4 100755 --- a/remote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats +++ b/remote/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats @@ -178,6 +178,15 @@ for DELAY in 1 1 0; do --data-urlencode "data@$DATAFILE" "$SLX_REMOTE_LOG" | grep -q "RESULT=0"; then rm -f -- "$DATAFILE" echo "$UUID" > "/run/system-uuid" + START=$(( $RANDOM % 5 )) + cat > "/etc/cron.d/usage_stats" <<-EOF + # Update usage statistics on server + + SHELL=/bin/sh + PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/openslx/sbin:/opt/openslx/bin + + ${START}-59/5 * * * * root /opt/openslx/scripts/cron-system_usage_update + EOF exit 0 fi sleep "$DELAY" |
