From 92e75854cb5f25832b20b2fbbd9439ae6413e6c5 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Thu, 15 May 2025 16:07:15 +0200 Subject: [PATCH] Testing --- misc/build.func | 9 +++++++++ misc/tools.func | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 74a3c2d..db0e240 100644 --- a/misc/build.func +++ b/misc/build.func @@ -42,6 +42,15 @@ error_handler() { local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" post_update_to_api "failed" "${command}" echo -e "\n$error_message\n" + + 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 } # Check if the shell is using bash shell_check() { diff --git a/misc/tools.func b/misc/tools.func index cb72e46..45062c0 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -444,7 +444,7 @@ install_composer() { # Download and install latest composer curl -fsSL https://getcomposer.org/installer -o /tmp/composer-setup.php - php -d -n display_errors=0 /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer >/dev/null 2>&1 + php -d display_errors=0 /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer >/dev/null 2>&1 if [[ $? -ne 0 ]]; then msg_error "Failed to install Composer"