blob: c76698e5b75141fe9d96659b2ea772bba1188ef0 [file] [log] [blame]
#!/usr/bin/zsh
#
# upload-crash-log spawns this as a subprocess in between log uploads.
# Run upload-logs-now to kill this process and make upload-crash-log
# start immediately (if it isn't already running).
#
read uptime idle </proc/uptime
uptime=${uptime%%.[0123456789]*}
DELAY=$((55 + $RANDOM % 10))
sleep "$DELAY" &
pid=$!
trap 'kill -15 $pid' EXIT
trap 'exit 1' INT TERM
wait