Files
Varaverk/Plugin/unraid/event/disks_unmounting/array_stop_jobs
T
Gmer4Lfe 86b8e894e5 Bypass PHP chain in array_stop_jobs — call array_stopping.sh directly via run_job.sh
PHP scheduler load at shutdown time can fail silently (errors suppressed); a failed PHP call meant the stop script never ran without any visible indication.
2026-06-22 12:45:31 -04:00

10 lines
559 B
Bash
Executable File

#!/bin/bash
# Varaverk: run array_stopping.sh on array stop (foreground — blocks until done).
# Direct bash call to avoid PHP/scheduler chain failing silently at shutdown time.
SCRIPTS_DIR="/boot/config/plugins/varaverk"
cfg="$SCRIPTS_DIR/varaverk.cfg"
[[ -f "$cfg" ]] && _sd=$(grep -oP '(?<=^SCRIPTS_DIR=")[^"]+' "$cfg" 2>/dev/null) && [[ -n "$_sd" ]] && SCRIPTS_DIR="$_sd"
runner="$SCRIPTS_DIR/Plugin/unraid/run_job.sh"
script="$SCRIPTS_DIR/Orchestrators/array_stopping.sh"
[[ -f "$script" ]] && bash "$runner" "Orchestrators/array_stopping.sh" "$script"