test
This commit is contained in:
parent
e885ad8bf6
commit
d9987442ae
@ -1438,13 +1438,17 @@ EOF'
|
|||||||
}
|
}
|
||||||
|
|
||||||
destroy_lxc() {
|
destroy_lxc() {
|
||||||
if [[ -n "$CTID" ]]; then
|
if [[ -n "$CT_ID" ]]; then
|
||||||
echo "Würde Container $CTID entfernen!"
|
read -p "Remove this Container? <y/N> " prompt
|
||||||
# pct stop "$CTID"
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
# pct destroy "$CTID"
|
pct stop "$CT_ID" &>/dev/null
|
||||||
# msg_ok "Removed this Container"
|
pct destroy "$CT_ID" &>/dev/null
|
||||||
|
msg_ok "Removed this Container"
|
||||||
|
else
|
||||||
|
msg_info "Container was not removed."
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "Keine CTID – nichts zu entfernen."
|
msg_error "No CT_ID found. Nothing to remove."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -449,18 +449,3 @@ check_or_create_swap() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
trap 'stop_spinner' EXIT INT TERM
|
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
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user