From 4cc8e3331ce9c8b08cf95aab2979197c8b62d5d7 Mon Sep 17 00:00:00 2001 From: the-sane <3657071+the-sane@users.noreply.github.com> Date: Thu, 31 Dec 2020 20:46:45 -0500 Subject: [PATCH] Only offer to restart lutris if it's running --- lug-helper.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lug-helper.sh b/lug-helper.sh index a925f41..0d0e246 100755 --- a/lug-helper.sh +++ b/lug-helper.sh @@ -683,17 +683,13 @@ rm_vidcache() { # Restart lutris lutris_restart() { - if [ "$lutris_needs_restart" = "true" ]; then + if [ "$lutris_needs_restart" = "true" ] && [ "$(pgrep lutris)" ]; then if message question "Lutris must be restarted to detect runner changes.\nWould you like this helper to restart it for you?"; then - if [ "$(pgrep lutris)" ]; then - debug_echo continue "Restarting Lutris..." - pkill -SIGTERM lutris && nohup lutris /dev/null & - else - message info "Lutris does not appear to be running." - fi + debug_echo continue "Restarting Lutris..." + pkill -SIGTERM lutris && nohup lutris /dev/null & fi - lutris_needs_restart="false" fi + lutris_needs_restart="false" } # Delete the selected runner