build.func

This commit is contained in:
Michel Roegl-Brunner 2025-05-15 16:10:17 +02:00
parent 92e75854cb
commit d9be26d116

View File

@ -43,13 +43,15 @@ error_handler() {
post_update_to_api "failed" "${command}" post_update_to_api "failed" "${command}"
echo -e "\n$error_message\n" echo -e "\n$error_message\n"
read -p "Remove this Container? <y/N> " prompt if [[ -n "$CTD_ID" ]]; then
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then read -p "Remove this Container? <y/N> " prompt
pct stop "$CTID" if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
pct destroy "$CTID" pct stop "$CTID"
msg_ok "Removed this script" pct destroy "$CTID"
else msg_ok "Removed this script"
msg_warn "Did not remove this script" else
msg_warn "Did not remove this script"
fi
fi fi
} }
# Check if the shell is using bash # Check if the shell is using bash