File the owner's containers on the mirror during onboard, with the icon resolved where the Emby key is
This commit is contained in:
@@ -454,6 +454,31 @@ deploy_xml_stack() {
|
||||
#
|
||||
# Usage: ensure_stack_networks_on_remote "$MIRROR_IP" "$MIRROR_SSH_KEY"
|
||||
# ==============================================================================================
|
||||
# ==============================================================================================
|
||||
# ── Container names this onboard deploys, read from the templates it deploys them from ────────
|
||||
#
|
||||
# Echoes one name per line. The <Name> element is the same value deploy_xml_stack() passes to
|
||||
# `docker create --name`, so this is the deployed set by construction rather than by asking the
|
||||
# mirror what it ended up with — which would also pick up whatever the mirror already ran.
|
||||
#
|
||||
# Usage: mapfile -t names < <(deployed_stack_container_names)
|
||||
# ==============================================================================================
|
||||
deployed_stack_container_names() {
|
||||
local -a xml_names=()
|
||||
[[ ${#PARTNERSHIP_AUTH_STACK[@]} -gt 0 ]] && xml_names+=("${PARTNERSHIP_AUTH_STACK[@]}")
|
||||
[[ ${#PARTNERSHIP_ARR_STACK[@]} -gt 0 ]] && xml_names+=("${PARTNERSHIP_ARR_STACK[@]}")
|
||||
[[ ${#PARTNERSHIP_SERVICES_STACK[@]} -gt 0 ]] && xml_names+=("${PARTNERSHIP_SERVICES_STACK[@]}")
|
||||
|
||||
local xml_name xml_file cname
|
||||
for xml_name in "${xml_names[@]}"; do
|
||||
[[ -z "$xml_name" ]] && continue
|
||||
xml_file="${TEMPLATES_DIR}/${xml_name}"
|
||||
[[ -f "$xml_file" ]] || continue
|
||||
cname=$(awk 'match($0,/<Name>([^<]+)<\/Name>/,a){print a[1];exit}' "$xml_file")
|
||||
[[ -n "$cname" ]] && echo "$cname"
|
||||
done
|
||||
}
|
||||
|
||||
ensure_stack_networks_on_remote() {
|
||||
local remote_ip="$1" ssh_key="$2"
|
||||
local -a xml_names=() nets=()
|
||||
|
||||
Reference in New Issue
Block a user