Skip to content

Commit

Permalink
add local var and missing return
Browse files Browse the repository at this point in the history
  • Loading branch information
Luatan committed Feb 11, 2024
1 parent 59b9ad2 commit 26d5c15
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/helper_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 26d5c15

Please sign in to comment.