Skip to content
Snippets Groups Projects
Unverified Commit ac9066c3 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

Add -n param to logsend

to ask it to run right away now, not waiting random time. It will be
used by updater under some circumstances.
parent 2c25890f
No related branches found
No related tags found
No related merge requests found
......@@ -57,7 +57,9 @@ trap 'rm -f "$TMPFILE" "$BUFFER" "$LOGFILE"' EXIT ABRT QUIT TERM
# Don't load the server all at once. With NTP-synchronized time, and
# thousand clients, it would make spikes on the CPU graph and that's not
# nice.
sleep $(( $(tr -cd 0-9 </dev/urandom | head -c 8 | sed -e 's/^0*//' ) % 120 ))
if [ "$1" != -n ] ; then
sleep $(( $(tr -cd 0-9 </dev/urandom | head -c 8 | sed -e 's/^0*//' ) % 120 ))
fi
cp /tmp/logs.last.sha1 "$TMPFILE" || true
set +e
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment