mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-02 00:56:39 +02:00
- Added ability to kill xkeysnail duplicate processes
This commit is contained in:
19
xkeysnail-config/killdups.sh
Executable file
19
xkeysnail-config/killdups.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
xkeycount=$(pgrep 'xkeysnail' | wc -l)
|
||||
|
||||
if [[ $xkeycount -lt 1 ]]; then
|
||||
# No dups found
|
||||
exit 0
|
||||
fi
|
||||
|
||||
while ! zenity --entry --title="Kinto Duplicates" --text="Type Password to end duplicates:" --hide-text| sudo -S cat /dev/null >/dev/null; do
|
||||
if ! $(zenity --question --text="Wrong password, try again?"); then
|
||||
# Dups still exist
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
pgrep 'xkeysnail' | head -n -1 | xargs -r -n1 sudo kill
|
||||
sudo -K # remove privilege
|
||||
# No dups should exist
|
||||
exit 0
|
Reference in New Issue
Block a user