incorp, host profiles into scripts that needed it
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
# not include these in its tracked file API response. Without protection these would
|
||||
# be classified as orphans and deleted — breaking Lidarr and Emby metadata display.
|
||||
#
|
||||
# Lidarr runs on HOST1 only — music library is HOST1's source of truth.
|
||||
# If run on HOST2 this script exits cleanly with no action.
|
||||
# All configuration in Master.conf under Arr Cleanup section.
|
||||
# Supports --dry-run to preview what would be deleted without making changes.
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
@@ -54,6 +56,21 @@ if ! command -v jq >/dev/null 2>&1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Lidarr runs on HOST1 only — exit cleanly if running on HOST2
|
||||
detect_hosts
|
||||
|
||||
if [[ "$LOCAL_SERVER_NAME" != "$HOST1" ]]; then
|
||||
info "Lidarr runs on $HOST1 only — skipping on $LOCAL_SERVER_NAME"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
LIDARR_URL="$HOST1_LIDARR_URL"
|
||||
LIDARR_API_KEY="$HOST1_LIDARR_API_KEY"
|
||||
LIDARR_MUSIC_ROOT="$HOST1_LIDARR_MUSIC_ROOT"
|
||||
|
||||
info "Lidarr instance: $LOCAL_SERVER_NAME → $LIDARR_URL"
|
||||
info "Music root: $LIDARR_MUSIC_ROOT"
|
||||
|
||||
require_var LIDARR_URL
|
||||
require_var LIDARR_API_KEY
|
||||
require_var LIDARR_MUSIC_ROOT
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
# (*.srt, *.sub, *.ass) but does not include these in its tracked file API response.
|
||||
# Without protection these would be classified as orphans and deleted.
|
||||
#
|
||||
# HOST1 Radarr manages Movies. HOST2 Radarr manages Anime_Movies.
|
||||
# detect_hosts() selects the correct URL, API key, and root path at runtime.
|
||||
# All configuration in Master.conf under Arr Cleanup section.
|
||||
# Supports --dry-run to preview what would be deleted without making changes.
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
@@ -54,6 +56,22 @@ if ! command -v jq >/dev/null 2>&1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Select correct Radarr instance based on which server is running this script
|
||||
detect_hosts
|
||||
|
||||
if [[ "$LOCAL_SERVER_NAME" == "$HOST1" ]]; then
|
||||
RADARR_URL="$HOST1_RADARR_URL"
|
||||
RADARR_API_KEY="$HOST1_RADARR_API_KEY"
|
||||
RADARR_MOVIES_ROOT="$HOST1_RADARR_MOVIES_ROOT"
|
||||
else
|
||||
RADARR_URL="$HOST2_RADARR_URL"
|
||||
RADARR_API_KEY="$HOST2_RADARR_API_KEY"
|
||||
RADARR_MOVIES_ROOT="$HOST2_RADARR_MOVIES_ROOT"
|
||||
fi
|
||||
|
||||
info "Radarr instance: $LOCAL_SERVER_NAME → $RADARR_URL"
|
||||
info "Movies root: $RADARR_MOVIES_ROOT"
|
||||
|
||||
require_var RADARR_URL
|
||||
require_var RADARR_API_KEY
|
||||
require_var RADARR_MOVIES_ROOT
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
# (*.srt, *.sub, *.ass) but does not include these in its tracked file API response.
|
||||
# Without protection these would be classified as orphans and deleted.
|
||||
#
|
||||
# HOST1 Sonarr manages Tv_Shows. HOST2 Sonarr manages Anime_Shows.
|
||||
# detect_hosts() selects the correct URL, API key, and root path at runtime.
|
||||
# All configuration in Master.conf under Arr Cleanup section.
|
||||
# Supports --dry-run to preview what would be deleted without making changes.
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
@@ -54,6 +56,22 @@ if ! command -v jq >/dev/null 2>&1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Select correct Sonarr instance based on which server is running this script
|
||||
detect_hosts
|
||||
|
||||
if [[ "$LOCAL_SERVER_NAME" == "$HOST1" ]]; then
|
||||
SONARR_URL="$HOST1_SONARR_URL"
|
||||
SONARR_API_KEY="$HOST1_SONARR_API_KEY"
|
||||
SONARR_TV_ROOT="$HOST1_SONARR_TV_ROOT"
|
||||
else
|
||||
SONARR_URL="$HOST2_SONARR_URL"
|
||||
SONARR_API_KEY="$HOST2_SONARR_API_KEY"
|
||||
SONARR_TV_ROOT="$HOST2_SONARR_TV_ROOT"
|
||||
fi
|
||||
|
||||
info "Sonarr instance: $LOCAL_SERVER_NAME → $SONARR_URL"
|
||||
info "TV root: $SONARR_TV_ROOT"
|
||||
|
||||
require_var SONARR_URL
|
||||
require_var SONARR_API_KEY
|
||||
require_var SONARR_TV_ROOT
|
||||
|
||||
Reference in New Issue
Block a user