From 9644f32489f188badc1152859df5a5e40a9af307 Mon Sep 17 00:00:00 2001 From: ale <ale@incal.net> Date: Sun, 3 Oct 2021 16:14:59 +0100 Subject: [PATCH] Fix cron script to use "shuf" --- conf/services.d/curator/run | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conf/services.d/curator/run b/conf/services.d/curator/run index 0146026..4d532b6 100755 --- a/conf/services.d/curator/run +++ b/conf/services.d/curator/run @@ -1,8 +1,7 @@ #!/bin/sh period=${CURATOR_CRON_PERIOD_SECS:-86400} -offset=$(printf '%d' 0x$(head -c 2 /dev/urandom | xxd -p)) -offset=$(( $offset % $period )) +offset=$(shuf -i 0-${period} -n 1) sleep $offset while true; do -- GitLab