diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index baa0a8bb..21b624f5 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -4589,11 +4589,11 @@ portwine_launch () { while true ; do sleep 5 if [[ -z "$GAMEPID" ]] ; then - GAMEPID="$(pgrep -fa 'EpicPortal|epicusername|epiclocale|AUTH_LOGIN' | awk '{print $1}')" + GAMEPID="$(pgrep -fa 'EpicPortal|epicusername|epiclocale|AUTH_LOGIN' | awk '{print $1}' | head -n 1)" else if waitpid "$GAMEPID" ; then sleep 1 - GAMEPID="$(pgrep -fa 'EpicPortal|epicusername|epiclocale|AUTH_LOGIN' | awk '{print $1}')" + GAMEPID="$(pgrep -fa 'EpicPortal|epicusername|epiclocale|AUTH_LOGIN' | awk '{print $1}' | head -n 1)" [[ -z "$GAMEPID" ]] && break || continue fi fi