From 682a08e970f847b96a24bc81f80c06e7d40308d0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 26 Sep 2023 19:16:25 -0400 Subject: [PATCH] Update build.func tweak --- misc/build.func | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/build.func b/misc/build.func index 90d24563..79b5b5ad 100644 --- a/misc/build.func +++ b/misc/build.func @@ -53,6 +53,7 @@ msg_error() { } # Run as root only +check_root() { if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then clear msg_error "Please run this script as root." @@ -60,6 +61,7 @@ if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then sleep 2 exit fi +} # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. pve_check() { @@ -428,6 +430,7 @@ advanced_settings() { } install_script() { + check_root ssh_check arch_check pve_check