From 48f5fe6130db606f021d67b14201f017abcaaa05 Mon Sep 17 00:00:00 2001 From: Johan Boule Date: Sun, 7 Jul 2024 17:30:56 +0200 Subject: [PATCH] Update common.sh Actually, we can't use the command bash built-in to check the existence of the program since it make be something like "snap run warzone2100" --- doc/hosting/linux_scripts/common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/hosting/linux_scripts/common.sh b/doc/hosting/linux_scripts/common.sh index 7853597429d..e0c7238cb02 100644 --- a/doc/hosting/linux_scripts/common.sh +++ b/doc/hosting/linux_scripts/common.sh @@ -5,8 +5,8 @@ function check { echo "[ERROR] netstat or ss is required to check for available ports" exit 1 fi - if [ ! "$(command -v $wz2100cmd)" ]; then - echo "[ERROR] Cannot execute \"$wz2100cmd\"." + if [ ! -v wz2100cmd ]; then + echo "[ERROR] wz2100cmd variable is not set." exit 1 fi if [ "$players" == "" ] || [ ! $players -gt 0 ]; then