From 6c93d02822911457f550af5ae4e20edeeeae0d68 Mon Sep 17 00:00:00 2001 From: luatan Date: Sun, 11 Feb 2024 14:03:58 +0100 Subject: [PATCH] add local var and missing return --- scripts/helper_functions.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/helper_functions.sh b/scripts/helper_functions.sh index 5a6531da6..606655d9a 100644 --- a/scripts/helper_functions.sh +++ b/scripts/helper_functions.sh @@ -70,8 +70,10 @@ isExecutable() { # Outputs 0 if RCON is not enabled # Outputs the player count if rcon is enabled get_player_count() { + local player_list if [ "${RCON_ENABLED,,}" != true ]; then echo 0 + return 0 fi player_list=$(rcon-cli -c /home/steam/server/rcon.yaml "ShowPlayers") echo -n "${player_list}" | wc -l