icorp host profiles into scripts that needed it
This commit is contained in:
@@ -43,6 +43,19 @@ if ! command -v jq >/dev/null 2>&1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Select correct Emby instance based on which server is running this script
|
||||
detect_hosts
|
||||
|
||||
if [[ "$LOCAL_SERVER_NAME" == "$HOST1" ]]; then
|
||||
EMBY_URL="$HOST1_EMBY_URL"
|
||||
EMBY_API_KEY="$HOST1_EMBY_API_KEY"
|
||||
else
|
||||
EMBY_URL="$HOST2_EMBY_URL"
|
||||
EMBY_API_KEY="$HOST2_EMBY_API_KEY"
|
||||
fi
|
||||
|
||||
info "Emby instance: $LOCAL_SERVER_NAME → $EMBY_URL"
|
||||
|
||||
require_var EMBY_URL
|
||||
require_var EMBY_API_KEY
|
||||
|
||||
|
||||
Reference in New Issue
Block a user