Skip to content

Commit b0cc6aa

Browse files
Update clean-lxcs.sh
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.
1 parent ce76ebc commit b0cc6aa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/pve/clean-lxcs.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ function header_info() {
1616
1717
EOF
1818
}
19+
set -eEuo pipefail
1920
BL=$(echo "\033[36m")
2021
RD=$(echo "\033[01;31m")
2122
CM='\xE2\x9C\x94\033'
@@ -35,6 +36,10 @@ done < <(pct list | awk 'NR>1')
3536
excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from cleaning:\n" \
3637
16 $((MSG_MAX_LENGTH + 23)) 6 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
3738

39+
if [ $? -ne 0 ]; then
40+
exit
41+
fi
42+
3843
function clean_container() {
3944
container=$1
4045
header_info

0 commit comments

Comments
 (0)