From bc001ed6e3fa61f4ca4b80946329b44135ab32c6 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 15 May 2025 16:06:06 +0200 Subject: [PATCH] move ct_deletion --- ct/debian.sh | 9 +++++++++ misc/build.func | 9 +-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ct/debian.sh b/ct/debian.sh index 0eedc00..187457d 100644 --- a/ct/debian.sh +++ b/ct/debian.sh @@ -40,3 +40,12 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" + +read -p "Remove this Container? " prompt + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + pct stop "$CTID" + pct destroy "$CTID" + msg_ok "Removed this script" + else + msg_warn "Did not remove this script" + fi diff --git a/misc/build.func b/misc/build.func index 8222a50..74a3c2d 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1428,14 +1428,7 @@ EOF systemctl start ping-instances.service fi - read -p "Remove this Container? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - pct stop "$CTID" - pct destroy "$CTID" - msg_ok "Removed this script" - else - msg_warn "Did not remove this script" - fi + post_update_to_api "done" "none" }