diff --git a/misc/build.func b/misc/build.func index f0a8b71b..f96a0984 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1438,13 +1438,17 @@ EOF' } destroy_lxc() { - if [[ -n "$CTID" ]]; then - echo "Würde Container $CTID entfernen!" - # pct stop "$CTID" - # pct destroy "$CTID" - # msg_ok "Removed this Container" + if [[ -n "$CT_ID" ]]; then + read -p "Remove this Container? " prompt + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + pct stop "$CT_ID" &>/dev/null + pct destroy "$CT_ID" &>/dev/null + msg_ok "Removed this Container" + else + msg_info "Container was not removed." + fi else - echo "Keine CTID – nichts zu entfernen." + msg_error "No CT_ID found. Nothing to remove." fi } diff --git a/misc/core.func b/misc/core.func index 1c56d1de..5df50efd 100644 --- a/misc/core.func +++ b/misc/core.func @@ -449,18 +449,3 @@ check_or_create_swap() { } trap 'stop_spinner' EXIT INT TERM - -destroy_lxc() { - if [[ -n "$CT_ID" ]]; then - read -p "Remove this Container? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - pct stop "$CT_ID" &>/dev/null - pct destroy "$CT_ID" &>/dev/null - msg_ok "Removed this Container" - else - msg_info "Container was not removed." - fi - else - msg_error "No CT_ID found. Nothing to remove." - fi -}