From c69e689c62773fc686077da5b30de270f4093c4b Mon Sep 17 00:00:00 2001 From: Simon Let Date: Mon, 16 Jan 2023 00:58:52 +0100 Subject: [PATCH] Update from v2.8.x fixes --- scripts/install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 5af7e80..2ef65b5 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -91,7 +91,7 @@ printf '\e[0m' # reset echo "Stopping RESH daemon ..." pid_file="${XDG_DATA_HOME-~/.local/share}/resh/daemon.pid" if [ ! -f "$pid_file" ]; then - # old pid file location + # Use old pid file location pid_file=~/.resh/resh.pid fi @@ -102,8 +102,10 @@ failed_to_kill() { fi } + if [ -f "$pid_file" ]; then - kill -SIGTERM "$pid_file" || failed_to_kill + pid=$(cat "$pid_file") + kill -SIGTERM "$pid" || failed_to_kill rm "$pid_file" else killall -SIGTERM resh-daemon || failed_to_kill