diff --git a/scripts/player_logging.sh b/scripts/player_logging.sh index 95ffb9c38..166b0cc4a 100644 --- a/scripts/player_logging.sh +++ b/scripts/player_logging.sh @@ -13,8 +13,8 @@ get_playername(){ } while true; do - mapfile -t server_pids < <(pgrep PalServer-Linux) - if [ "${#server_pids[@]}" -ne 0 ]; then + server_pid=$(pidof PalServer-Linux-Test) + if [ -n "${server_pid}" ]; then # Player IDs are usally 9 or 10 digits however when a player joins for the first time for a given boot their ID is temporary 00000000 (8x zeros) while loading # Player ID is also 00000000 (8x zeros) when in character creation mapfile -t current_player_list < <( get_players_list | tail -n +2 | sed '/,00000000,[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/d' | sort )