diff --git a/files/rabbit-client.sh b/files/rabbit-client.sh index 3c968f7..0fb9c9b 100644 --- a/files/rabbit-client.sh +++ b/files/rabbit-client.sh @@ -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="${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 @@ -369,5 +373,4 @@ else sleep "$SLEEP_SECS" fi done -fi - +fi \ No newline at end of file