Detect helper scripts based on tags (so it can detect even if the container is shutdown)
This commit is contained in:
parent
aab59bce4b
commit
503e9be156
@ -77,16 +77,14 @@ fi
|
|||||||
|
|
||||||
menu_items=()
|
menu_items=()
|
||||||
FORMAT="%-10s %-15s %-10s"
|
FORMAT="%-10s %-15s %-10s"
|
||||||
|
TAGS="community-script|proxmox-helper-scripts"
|
||||||
|
|
||||||
while read -r container; do
|
while read -r container; do
|
||||||
container_id=$(echo $container | awk '{print $1}')
|
container_id=$(echo $container | awk '{print $1}')
|
||||||
container_name=$(echo $container | awk '{print $2}')
|
container_name=$(echo $container | awk '{print $2}')
|
||||||
container_status=$(echo $container | awk '{print $3}')
|
container_status=$(echo $container | awk '{print $3}')
|
||||||
formatted_line=$(printf "$FORMAT" "$container_name" "$container_status")
|
formatted_line=$(printf "$FORMAT" "$container_name" "$container_status")
|
||||||
#IS_HELPERSCRIPT_LXC=$(pct exec $container_id -- [ -e /usr/bin/update ] && echo true || echo false)
|
if pct config $container | grep -E "^tags:.*(${TAGS}).*"; then
|
||||||
#if [ "$IS_HELPERSCRIPT_LXC" = true ]; then
|
|
||||||
detect_service $container
|
|
||||||
if [ -n "${service}" ]; then
|
|
||||||
menu_items+=("$container_id" "$formatted_line" "OFF")
|
menu_items+=("$container_id" "$formatted_line" "OFF")
|
||||||
fi
|
fi
|
||||||
done <<< "$containers"
|
done <<< "$containers"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user