1901
This commit is contained in:
@@ -192,6 +192,10 @@ dispatch_task() {
|
|||||||
n="${BASH_REMATCH[1]}"
|
n="${BASH_REMATCH[1]}"
|
||||||
base_task="update-reboot-scheduler"
|
base_task="update-reboot-scheduler"
|
||||||
extra_nbplay_opts+=("-erebootin=${n}")
|
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
|
elif [[ "$base_task" =~ ^update-indoor_([0-9]{1,4})$ ]]; then
|
||||||
# CHANGED: keep same convention as others — pass HOURS directly via -e rebootin=<n>
|
# CHANGED: keep same convention as others — pass HOURS directly via -e rebootin=<n>
|
||||||
n="${BASH_REMATCH[1]}"
|
n="${BASH_REMATCH[1]}"
|
||||||
@@ -206,7 +210,7 @@ dispatch_task() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# --- Default rebootin for reboot-family when not explicitly provided ---
|
# --- 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
|
# 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
|
if [[ "$task_options" != *"rebootin="* ]] && ! printf '%s\n' "${extra_nbplay_opts[@]}" | grep -q 'rebootin='; then
|
||||||
# restore legacy behavior: immediate reboot if none specified
|
# restore legacy behavior: immediate reboot if none specified
|
||||||
@@ -370,4 +374,3 @@ else
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user