diff --git a/Fallback/fallback.sh b/Fallback/fallback.sh index 29d54b9..934b33b 100755 --- a/Fallback/fallback.sh +++ b/Fallback/fallback.sh @@ -263,6 +263,11 @@ fi acquire_lock # strict single instance — notifies on collision +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + detect_hosts resolve_remote_ip diff --git a/Fallback/fallback_test.sh b/Fallback/fallback_test.sh index 28765e8..beea5e0 100644 --- a/Fallback/fallback_test.sh +++ b/Fallback/fallback_test.sh @@ -151,6 +151,11 @@ fi acquire_lock # strict single instance — modifies iptables and containers +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + detect_hosts resolve_remote_ip diff --git a/Media/lidarr_cleanup.sh b/Media/lidarr_cleanup.sh index bec8f9c..acc6acc 100644 --- a/Media/lidarr_cleanup.sh +++ b/Media/lidarr_cleanup.sh @@ -165,6 +165,11 @@ validate_unraid_cmd \ [[ -n "${LIDARR_LOCK_WARN_AGE:-}" ]] && LOCK_WARN_AGE="$LIDARR_LOCK_WARN_AGE" acquire_lock "wait" +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + # detect_hosts() sets MY_ID and aliases LIDARR_URL, LIDARR_API_KEY, LIDARR_MUSIC_ROOT detect_hosts diff --git a/Media/radarr_cleanup.sh b/Media/radarr_cleanup.sh index 8e252e7..4c2300d 100644 --- a/Media/radarr_cleanup.sh +++ b/Media/radarr_cleanup.sh @@ -151,6 +151,11 @@ validate_unraid_cmd \ acquire_lock "wait" +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + # detect_hosts() sets MY_ID and aliases RADARR_URL, RADARR_API_KEY, RADARR_MOVIES_ROOT detect_hosts diff --git a/Media/sonarr_cleanup.sh b/Media/sonarr_cleanup.sh index bec4296..b2108ec 100644 --- a/Media/sonarr_cleanup.sh +++ b/Media/sonarr_cleanup.sh @@ -151,6 +151,11 @@ validate_unraid_cmd \ acquire_lock "wait" +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + # detect_hosts() sets MY_ID and aliases SONARR_URL, SONARR_API_KEY, SONARR_TV_ROOT detect_hosts diff --git a/Orchestrators/array_stopping.sh b/Orchestrators/array_stopping.sh index 096866d..d8419f8 100755 --- a/Orchestrators/array_stopping.sh +++ b/Orchestrators/array_stopping.sh @@ -60,6 +60,11 @@ validate_unraid_cmd \ acquire_lock +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + detect_hosts [[ "$DRY_RUN" == true ]] && warn "DRY RUN — no stop scripts will be executed" diff --git a/Orchestrators/daily_sync_maintenance.sh b/Orchestrators/daily_sync_maintenance.sh index 69f4ebe..017f783 100644 --- a/Orchestrators/daily_sync_maintenance.sh +++ b/Orchestrators/daily_sync_maintenance.sh @@ -88,6 +88,11 @@ validate_unraid_cmd \ "" "" \ "unRAID notify script" || warn "unRAID notify script not found — native notifications disabled" +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + detect_hosts resolve_remote_ip diff --git a/Orchestrators/transcode_management.sh b/Orchestrators/transcode_management.sh index 36f2d12..17e7e5a 100644 --- a/Orchestrators/transcode_management.sh +++ b/Orchestrators/transcode_management.sh @@ -72,6 +72,11 @@ fi acquire_lock "wait" +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + # detect_hosts() sets MY_ID and aliases all HOST*_TRANSCODE_* vars detect_hosts diff --git a/Orchestrators/weekly_sync_maintenance.sh b/Orchestrators/weekly_sync_maintenance.sh index 92c9f24..b066416 100644 --- a/Orchestrators/weekly_sync_maintenance.sh +++ b/Orchestrators/weekly_sync_maintenance.sh @@ -83,6 +83,11 @@ validate_unraid_cmd \ acquire_lock +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + detect_hosts resolve_remote_ip diff --git a/Partnership/partnership_manager.sh b/Partnership/partnership_manager.sh index e7c7182..973ad3f 100644 --- a/Partnership/partnership_manager.sh +++ b/Partnership/partnership_manager.sh @@ -237,6 +237,11 @@ validate_unraid_cmd \ "" "" \ "unRAID notify script" || warn "unRAID notify script not found — native notifications disabled" +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + # detect_hosts() sets MY_ID and aliases PARTNERSHIP_AUTH_WEBUIS, PARTNERSHIP_MIRROR_BACKUPS detect_hosts diff --git a/Partnership/partnership_offboard.sh b/Partnership/partnership_offboard.sh index 0073493..d1dd46b 100755 --- a/Partnership/partnership_offboard.sh +++ b/Partnership/partnership_offboard.sh @@ -97,6 +97,11 @@ PARTNERSHIP_LIB_MODE=1 source "$SCRIPT_DIR/partnership_manager.sh" # ============================================================================================== [[ "$EUID" -ne 0 ]] && { error "Must be run as root"; exit 1; } +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + detect_hosts OWNER_ID="${PARTNERSHIP_OWNER_HOST:-HOST1}" diff --git a/Partnership/partnership_onboard.sh b/Partnership/partnership_onboard.sh index 0d59f5c..fc9c334 100755 --- a/Partnership/partnership_onboard.sh +++ b/Partnership/partnership_onboard.sh @@ -158,6 +158,11 @@ parse_args "${FILTERED_ARGS[@]}" acquire_lock +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + detect_hosts OWNER_ID="${PARTNERSHIP_OWNER_HOST:-HOST1}" diff --git a/Rsync/rsync.sh b/Rsync/rsync.sh index 9fa7775..d2a4f3f 100644 --- a/Rsync/rsync.sh +++ b/Rsync/rsync.sh @@ -165,6 +165,11 @@ fi acquire_lock +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + validate_unraid_cmd \ "/usr/local/emhttp/plugins/dynamix/scripts/notify" \ "" "" \ diff --git a/Tools/container_data_export.sh b/Tools/container_data_export.sh index f352ac1..86a7af2 100644 --- a/Tools/container_data_export.sh +++ b/Tools/container_data_export.sh @@ -88,6 +88,11 @@ fi acquire_lock +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + validate_unraid_cmd \ "/usr/local/emhttp/plugins/dynamix/scripts/notify" \ "" "" \ diff --git a/Tools/emby_database_repair.sh b/Tools/emby_database_repair.sh index ec4e687..2c02060 100644 --- a/Tools/emby_database_repair.sh +++ b/Tools/emby_database_repair.sh @@ -113,6 +113,11 @@ fi acquire_lock +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + # detect_hosts() sets MY_ID and aliases HOST*_EMBY_CONTAINER → EMBY_CONTAINER detect_hosts diff --git a/Tools/watchdog_skip_list_manager.sh b/Tools/watchdog_skip_list_manager.sh index 1663527..e915530 100644 --- a/Tools/watchdog_skip_list_manager.sh +++ b/Tools/watchdog_skip_list_manager.sh @@ -116,6 +116,11 @@ validate_unraid_cmd \ acquire_lock +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + # detect_hosts() sets MY_ID — used in output detect_hosts diff --git a/Transcodes/transcode_manager.sh b/Transcodes/transcode_manager.sh index 5dad2f6..3e56403 100644 --- a/Transcodes/transcode_manager.sh +++ b/Transcodes/transcode_manager.sh @@ -157,6 +157,11 @@ validate_unraid_cmd \ acquire_lock "wait" +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + # detect_hosts() sets MY_ID and aliases all HOST*_TRANSCODE_* vars detect_hosts diff --git a/git_pull_execute.sh b/git_pull_execute.sh index 3e2513f..cd8731a 100755 --- a/git_pull_execute.sh +++ b/git_pull_execute.sh @@ -64,6 +64,11 @@ if [[ "$EUID" -ne 0 ]]; then fi acquire_lock +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + # detect_hosts() sets MY_ID — needed for sparse checkout configuration detect_hosts diff --git a/unRAID_Essentials/clear_logs.sh b/unRAID_Essentials/clear_logs.sh index a8c21d7..938f80b 100644 --- a/unRAID_Essentials/clear_logs.sh +++ b/unRAID_Essentials/clear_logs.sh @@ -100,6 +100,11 @@ validate_unraid_cmd \ acquire_lock +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + detect_hosts [[ "$DRY_RUN" == true ]] && warn "DRY RUN — no files will be cleared" diff --git a/unRAID_Essentials/inotify_tuning.sh b/unRAID_Essentials/inotify_tuning.sh index ce70f5f..5162881 100755 --- a/unRAID_Essentials/inotify_tuning.sh +++ b/unRAID_Essentials/inotify_tuning.sh @@ -106,6 +106,11 @@ validate_unraid_cmd \ acquire_lock +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + detect_hosts [[ "$DRY_RUN" == true ]] && warn "DRY RUN — no changes will be made" diff --git a/unRAID_Essentials/resource_watchdog.sh b/unRAID_Essentials/resource_watchdog.sh index 20d411a..2545d98 100755 --- a/unRAID_Essentials/resource_watchdog.sh +++ b/unRAID_Essentials/resource_watchdog.sh @@ -124,6 +124,11 @@ fi acquire_lock +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + detect_hosts DOCKER_TIMEOUT=15 diff --git a/unRAID_Essentials/rsync_stop.sh b/unRAID_Essentials/rsync_stop.sh index 1c332a9..4d83066 100755 --- a/unRAID_Essentials/rsync_stop.sh +++ b/unRAID_Essentials/rsync_stop.sh @@ -121,6 +121,11 @@ validate_unraid_cmd \ acquire_lock +if ! command -v docker &>/dev/null; then + error "Docker command not found" + exit 1 +fi + detect_hosts # Soft IP resolution — rsync_stop continues local-only if remote unreachable