fix: include UNRAID_COMPOSE_DIR in variable requirements and update paths in phase1_teardown.sh
This commit is contained in:
@@ -45,9 +45,10 @@ confirm_action() {
|
||||
}
|
||||
|
||||
load_env
|
||||
require_vars UNRAID_IP UNRAID_SSH_USER UNRAID_GITEA_DATA_PATH
|
||||
require_vars UNRAID_IP UNRAID_SSH_USER UNRAID_GITEA_DATA_PATH UNRAID_COMPOSE_DIR
|
||||
|
||||
DATA_PATH="$UNRAID_GITEA_DATA_PATH"
|
||||
COMPOSE_DIR="${UNRAID_COMPOSE_DIR}/gitea"
|
||||
|
||||
log_warn "=== Phase 1 Teardown: Gitea on Unraid ==="
|
||||
|
||||
@@ -58,10 +59,10 @@ TEARDOWN_FAILED=false
|
||||
# Step 1: Stop and remove the Gitea container
|
||||
# ---------------------------------------------------------------------------
|
||||
# Check if docker-compose file exists (skip if already torn down)
|
||||
if ssh_exec UNRAID "test -f '${DATA_PATH}/docker-compose.yml'" 2>/dev/null; then
|
||||
if ssh_exec UNRAID "test -f '${COMPOSE_DIR}/docker-compose.yml'" 2>/dev/null; then
|
||||
if confirm_action 'This will stop Gitea on Unraid. Continue? [y/N] '; then
|
||||
# Try modern "docker compose" first, fall back to standalone
|
||||
if ssh_exec UNRAID "cd '${DATA_PATH}' && docker compose down 2>/dev/null || docker-compose down"; then
|
||||
if ssh_exec UNRAID "cd '${COMPOSE_DIR}' && docker compose down 2>/dev/null || docker-compose down"; then
|
||||
log_success "Gitea container stopped and removed"
|
||||
else
|
||||
log_error "Failed to stop/remove Gitea container via docker-compose"
|
||||
|
||||
Reference in New Issue
Block a user