fix network creation: use -f for rm, show errors on create

This commit is contained in:
Claus Lohmar 2026-07-11 10:14:10 +01:00
parent 14e60151fd
commit 0d7defff4e

View file

@ -210,7 +210,7 @@ if [ "$MODE" = "destroy" ]; then
# Stop rootless containers
podman stop caddy authelia launcher 2>/dev/null || true
podman rm caddy authelia launcher 2>/dev/null || true
podman network rm "$NETWORK_NAME" 2>/dev/null || true
podman network rm -f "$NETWORK_NAME" 2>/dev/null || true
# Wipe target
maybe_sudo rm -rf "$TARGET_DIR"
maybe_sudo mkdir -p "$TARGET_DIR/config/caddy" "$TARGET_DIR/config/authelia" \
@ -304,8 +304,8 @@ maybe_sudo chown -R "$RUN_USER:" "$BACKUP_DIR" 2>/dev/null || true
# ============================================================
echo "[*] Deploying containers on $NETWORK_NAME..."
podman network rm "$NETWORK_NAME" 2>/dev/null || true
podman network create --subnet 172.18.0.0/24 "$NETWORK_NAME" 2>/dev/null || true
podman network rm -f "$NETWORK_NAME" 2>/dev/null || true
podman network create --subnet 172.18.0.0/24 "$NETWORK_NAME"
# AUTHELIA_SECRET is SESSION_SECRET (Authelia session.secret)
AUTHELIA_SECRET="${SESSION_SECRET:-}"