From e3171913cd9dfad600d963765887e7d6b46b9f54 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 19 Jun 2025 12:48:48 +0200 Subject: [PATCH] Update create_lxc.sh --- misc/create_lxc.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/misc/create_lxc.sh b/misc/create_lxc.sh index a1dc56a8..fca5ad2c 100644 --- a/misc/create_lxc.sh +++ b/misc/create_lxc.sh @@ -145,11 +145,13 @@ fi # Check Cluster Quorum if in Cluster if [ -f /etc/pve/corosync.conf ]; then - if ! pvecm status | grep -q "Quorate: Yes"; then + msg_info "Checking Proxmox cluster quorum status" + if ! pvecm status | awk -F':' '/^Quorate/ { exit ($2 ~ /Yes/) ? 0 : 1 }'; then printf "\e[?25h" - echo -e "\n${CROSS}${RD}Cluster is not quorate. Start all nodes or configure quorum device (QDevice).${CL}\n" + msg_error "Cluster is not quorate. Start all nodes or configure quorum device (QDevice)." exit 210 fi + msg_ok "Cluster is quorate" fi # Update LXC template list