From bb7d4388cf9fcf4ff11ba2a7093434946f254c81 Mon Sep 17 00:00:00 2001 From: default Date: Thu, 24 Oct 2024 14:25:31 +0000 Subject: [PATCH] Require sudo to install only --- kasmvnc/run.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kasmvnc/run.sh b/kasmvnc/run.sh index 038558b2..5cbdd798 100644 --- a/kasmvnc/run.sh +++ b/kasmvnc/run.sh @@ -84,12 +84,6 @@ install_alpine() { rm /tmp/kasmvncserver.tgz } -# Check for sudo (required) -if ! command -v sudo &> /dev/null; then - echo "ERROR: Required command 'sudo' not found" - exit 1 -fi - # Detect system information if [[ ! -f /etc/os-release ]]; then echo "ERROR: Cannot detect OS: /etc/os-release not found" @@ -128,6 +122,12 @@ esac # Check if vncserver is installed, and install if not if ! check_installed; then + # Check for sudo (required) + if ! command -v sudo &> /dev/null; then + echo "ERROR: Required command 'sudo' not found" + exit 1 + fi + base_url="https://github.com/kasmtech/KasmVNC/releases/download/v${KASM_VERSION}" echo "Installing KASM version: ${KASM_VERSION}"