From 5cf162a3c9feb23d5648ebf6a443cdec7ee6fe61 Mon Sep 17 00:00:00 2001 From: Manu <209072369+PonyXplosion@users.noreply.github.com> Date: Mon, 28 Apr 2025 15:42:49 +0200 Subject: [PATCH] Update clean-lxcs.sh (#4102) Shell option missing, needed to be able to NO/CANCEL the whiptail dialog box. Without it NO/CANCEL is without function and the script will proceed. This shell option is used in the other scripts, but here it is missing. Also the needed if-statement is missing. --- tools/pve/clean-lxcs.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/pve/clean-lxcs.sh b/tools/pve/clean-lxcs.sh index 1c8cfe173..a4a36fd64 100644 --- a/tools/pve/clean-lxcs.sh +++ b/tools/pve/clean-lxcs.sh @@ -16,6 +16,7 @@ function header_info() { EOF } +set -eEuo pipefail BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") CM='\xE2\x9C\x94\033' @@ -35,6 +36,10 @@ done < <(pct list | awk 'NR>1') excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from cleaning:\n" \ 16 $((MSG_MAX_LENGTH + 23)) 6 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') +if [ $? -ne 0 ]; then + exit +fi + function clean_container() { container=$1 header_info