File tree Expand file tree Collapse file tree
root/etc/s6-overlay/s6-rc.d/init-modmanager-config Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,13 +5,21 @@ CRON_MINS=$((0 + RANDOM % 59))
55
66sed -i "s/@@MINUTES@@/${CRON_MINS}/" /etc/crontabs/root
77
8- if [[ $(date "+%H") -gt 0 && $(date "+%H") -lt 6 ]]; then
8+ if [[ $(date "+%H") == 0 && $(date "+%m") -lt ${CRON_MINS} ]]; then
9+ NEXT_HOUR=0
10+ elif [[ $(date "+%H") == 6 && $(date "+%m") -lt ${CRON_MINS} ]]; then
11+ NEXT_HOUR=6
12+ elif [[ $(date "+%H") == 12 && $(date "+%m") -lt ${CRON_MINS} ]]; then
13+ NEXT_HOUR=12
14+ elif [[ $(date "+%H") == 18 && $(date "+%m") -le ${CRON_MINS} ]]; then
15+ NEXT_HOUR=18
16+ elif [[ $(date "+%H") -ge 0 && $(date "+%H") -lt 6 ]]; then
917 NEXT_HOUR=6
10- elif [[ $(date "+%H") -gt 6 && $(date "+%H") -lt 12 ]]; then
18+ elif [[ $(date "+%H") -ge 6 && $(date "+%H") -lt 12 ]]; then
1119 NEXT_HOUR=12
12- elif [[ $(date "+%H") -gt 12 && $(date "+%H") -lt 18 ]]; then
20+ elif [[ $(date "+%H") -ge 12 && $(date "+%H") -lt 18 ]]; then
1321 NEXT_HOUR=18
14- else [[ $(date "+%H") -gt 18 && $(date "+%H") -le 23 ]];
22+ elif [[ $(date "+%H") -ge 18 && $(date "+%H") -le 23 ]]; then
1523 NEXT_HOUR=0
1624fi
1725
You can’t perform that action at this time.
0 commit comments