From 503e9be156fbe31679a0f63a93f30dfb751d3a0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20B=C3=A9dard-Couture?= Date: Mon, 21 Jul 2025 16:24:31 -0400 Subject: [PATCH] Detect helper scripts based on tags (so it can detect even if the container is shutdown) --- tools/pve/update-apps.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/tools/pve/update-apps.sh b/tools/pve/update-apps.sh index 6268cf23..73ee0474 100644 --- a/tools/pve/update-apps.sh +++ b/tools/pve/update-apps.sh @@ -77,18 +77,16 @@ fi menu_items=() FORMAT="%-10s %-15s %-10s" +TAGS="community-script|proxmox-helper-scripts" while read -r container; do - container_id=$(echo $container | awk '{print $1}') - container_name=$(echo $container | awk '{print $2}') - container_status=$(echo $container | awk '{print $3}') - formatted_line=$(printf "$FORMAT" "$container_name" "$container_status") - #IS_HELPERSCRIPT_LXC=$(pct exec $container_id -- [ -e /usr/bin/update ] && echo true || echo false) - #if [ "$IS_HELPERSCRIPT_LXC" = true ]; then - detect_service $container - if [ -n "${service}" ]; then - menu_items+=("$container_id" "$formatted_line" "OFF") - fi + container_id=$(echo $container | awk '{print $1}') + container_name=$(echo $container | awk '{print $2}') + container_status=$(echo $container | awk '{print $3}') + formatted_line=$(printf "$FORMAT" "$container_name" "$container_status") + if pct config $container | grep -E "^tags:.*(${TAGS}).*"; then + menu_items+=("$container_id" "$formatted_line" "OFF") + fi done <<< "$containers" CHOICE=$(whiptail --title "LXC Container Update" \