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