fix: use sudo for data removal in phase1_teardown.sh to ensure permissions

This commit is contained in:
S
2026-03-02 19:19:54 -05:00
parent 6716cb5ba8
commit 13dd93a1aa

View File

@@ -101,7 +101,7 @@ if [[ -n "$running_container" ]]; then
log_warn "Stop the container first, then re-run teardown to remove data."
elif ssh_exec UNRAID "test -d '${DATA_PATH}'" 2>/dev/null; then
if confirm_action "$(printf 'Remove ALL Gitea data at %s? This is IRREVERSIBLE. [y/N] ' "$DATA_PATH")"; then
if ssh_exec UNRAID "rm -rf '${DATA_PATH}'"; then
if ssh_exec UNRAID "sudo rm -rf '${DATA_PATH}'"; then
log_success "All Gitea data removed from Unraid"
else
log_error "Failed to remove data directory ${DATA_PATH}"