From 41dd87877b48d011faa729b92bb33b0bd70fff14 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 22 May 2025 14:20:11 +0200 Subject: [PATCH] Update build.func --- misc/build.func | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/misc/build.func b/misc/build.func index 5736fc7..fe2e169 100644 --- a/misc/build.func +++ b/misc/build.func @@ -925,6 +925,7 @@ check_container_storage() { start() { source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/tools.func) + if command -v pveversion >/dev/null 2>&1; then if ! (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then clear @@ -932,6 +933,8 @@ start() { exit fi install_script + build_container + description else CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ "Support/Update functions for ${APP} LXC. Choose an option:" \ @@ -944,18 +947,22 @@ start() { 1) VERBOSE="no" set_std_mode + update_script ;; + 2) VERBOSE="yes" set_std_mode + update_script ;; + 3) clear exit_script exit ;; esac - update_script + return fi } @@ -963,11 +970,6 @@ 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 @@ -1110,9 +1112,6 @@ 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