mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-25 05:57:26 +00:00
destroy_lxc
This commit is contained in:
@@ -449,3 +449,18 @@ check_or_create_swap() {
|
||||
}
|
||||
|
||||
trap 'stop_spinner' EXIT INT TERM
|
||||
|
||||
destroy_lxc() {
|
||||
if [[ -n "$CT_ID" ]]; then
|
||||
read -p "Remove this Container? <y/N> " 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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user