From f37d7d09ec2b86c985f4ff7bd80498d0a19cfdd0 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Tue, 4 Aug 2020 17:37:59 -0500 Subject: [PATCH] - Updated killdups to end all orphaned processes before initiating a new process --- xkeysnail-config/killdups.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xkeysnail-config/killdups.sh b/xkeysnail-config/killdups.sh index 8b007ca..9bd1605 100755 --- a/xkeysnail-config/killdups.sh +++ b/xkeysnail-config/killdups.sh @@ -2,7 +2,7 @@ xkeycount=$(pgrep 'xkeysnail' | wc -l) -if [[ $xkeycount -lt 1 ]]; then +if [[ $xkeycount -le 1 ]]; then # No dups found exit 0 fi @@ -13,7 +13,8 @@ if ! $(zenity --question --text="Wrong password, try again?"); then exit 1 fi done -pgrep 'xkeysnail' | head -n -1 | xargs -r -n1 sudo kill +# pgrep 'xkeysnail' | head -n -1 | xargs -r -n1 sudo kill +pgrep 'xkeysnail' | xargs -r -n1 sudo kill sudo -K # remove privilege # No dups should exist exit 0 \ No newline at end of file