From aa030679a732eff6379282c0c8fca9a7b3d5a03d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 22 May 2025 14:18:20 +0200 Subject: [PATCH] Update build.func --- misc/build.func | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/misc/build.func b/misc/build.func index 942634e..5736fc7 100644 --- a/misc/build.func +++ b/misc/build.func @@ -963,6 +963,11 @@ start() { build_container() { # if [ "$VERBOSE" == "yes" ]; then set -x; fi + if ! command -v pveversion >/dev/null 2>&1; then + echo -e "${INFO}${YW} build_container() skipped – not running on Proxmox${CL}" + return 0 + fi + if [ "$CT_TYPE" == "1" ]; then FEATURES="keyctl=1,nesting=1" else @@ -1105,6 +1110,9 @@ EOF' # This function sets the description of the container. description() { + if ! command -v pveversion >/dev/null 2>&1; then + return 0 + fi IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) # Generate LXC Description