Skip to content

Commit

Permalink
Update common.sh
Browse files Browse the repository at this point in the history
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"
  • Loading branch information
johan-boule authored Jul 7, 2024
1 parent b49a4dd commit 48f5fe6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/hosting/linux_scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 48f5fe6

Please sign in to comment.