This commit is contained in:
2026-03-31 19:01:00 +03:00
parent 253be85333
commit 2e2730fd80

View File

@@ -192,6 +192,10 @@ dispatch_task() {
n="${BASH_REMATCH[1]}"
base_task="update-reboot-scheduler"
extra_nbplay_opts+=("-erebootin=${n}")
elif [[ "$base_task" =~ ^(update-reboot[0-9]{3}-scheduler)_([0-9]{1,4})$ ]]; then
base_task="${BASH_REMATCH[1]}"
n="${BASH_REMATCH[2]}"
extra_nbplay_opts+=("-erebootin=${n}")
elif [[ "$base_task" =~ ^update-indoor_([0-9]{1,4})$ ]]; then
# CHANGED: keep same convention as others — pass HOURS directly via -e rebootin=<n>
n="${BASH_REMATCH[1]}"
@@ -206,7 +210,7 @@ dispatch_task() {
fi
# --- Default rebootin for reboot-family when not explicitly provided ---
if [[ "$base_task" =~ ^(update-rebootin222|update-rebootin|update-reboot|update-reboot-scheduler)$ ]]; then
if [[ "$base_task" =~ ^(update-rebootin222|update-rebootin|update-reboot|update-reboot-scheduler|update-reboot[0-9]{3}-scheduler)$ ]]; then
# only set if neither task_options nor extra_nbplay_opts already contain rebootin
if [[ "$task_options" != *"rebootin="* ]] && ! printf '%s\n' "${extra_nbplay_opts[@]}" | grep -q 'rebootin='; then
# restore legacy behavior: immediate reboot if none specified
@@ -370,4 +374,3 @@ else
fi
done
fi