From 8eee34b01fccdf18faa528f5a2190df61a0171b6 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 12 Mar 2025 11:59:37 +0100 Subject: [PATCH] Update switch_from_VED_to_VE.sh --- misc/switch_from_VED_to_VE.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/misc/switch_from_VED_to_VE.sh b/misc/switch_from_VED_to_VE.sh index 8bb2a4b..251b3ca 100644 --- a/misc/switch_from_VED_to_VE.sh +++ b/misc/switch_from_VED_to_VE.sh @@ -95,14 +95,21 @@ function remove_dev_tag() { header_info echo "Searching for containers with 'community-script-dev' tag..." + +found=0 for container in $(pct list | awk '{if(NR>1) print $1}'); do tags=$(pct config "$container" | awk '/^tags/ {print $2}') if [[ "$tags" == *"community-script-dev"* ]]; then + found=1 update_container "$container" update_motd "$container" remove_dev_tag "$container" fi done +if [[ $found -eq 0 ]]; then + echo -e "${RD}[Error]${CL} No containers found with the tag 'community-script-dev'. Exiting script." + exit 1 +fi header_info echo -e "${GN}The process is complete.${CL}\n"