From adc627f43cd3b2952689c65ca278c636f9b70820 Mon Sep 17 00:00:00 2001 From: the-sane <3657071+the-sane@users.noreply.github.com> Date: Tue, 1 Nov 2022 11:50:20 -0400 Subject: [PATCH] Fix process grepping Excludes the grep process itself --- lug-helper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lug-helper.sh b/lug-helper.sh index 015bfa5..8a7a7c5 100755 --- a/lug-helper.sh +++ b/lug-helper.sh @@ -915,12 +915,12 @@ lutris_restart() { if [ "$lutris_needs_restart" = "true" ] && [ "$(pgrep -f lutris)" ]; then if message question "Lutris must be restarted to detect the changes.\nWould you like this Helper to restart it for you?"; then # Detect which version of Lutris is running and restart it - if [ "$lutris_native" = "true" ] && pgrep -f lutris | xargs ps -fp | grep -q "/usr/bin/lutris"; then + if [ "$lutris_native" = "true" ] && pgrep -f lutris | xargs ps -fp | grep -q "[/]usr/bin/lutris"; then # Native Lutris is running debug_print continue "Restarting native Lutris..." pkill -f -SIGTERM lutris && nohup lutris /dev/null & fi - if [ "$lutris_flatpak" = "true" ] && pgrep -f lutris | xargs ps -fp | grep -q "/app/bin/lutris"; then + if [ "$lutris_flatpak" = "true" ] && pgrep -f lutris | xargs ps -fp | grep -q "[/]app/bin/lutris"; then # Flatpak Lutris is running debug_print continue "Restarting flatpak Lutris..." pkill -f -SIGTERM lutris && nohup flatpak run net.lutris.Lutris /dev/null &