Last active
July 13, 2021 21:04
-
-
Save raulpy271/3a05c3fd138013fcc4edb9b8cbdc6ac1 to your computer and use it in GitHub Desktop.
Using Discord in linux I have this problem: When the user click's in the close button , the Discord app don't exit, this script close it anyway!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Use without download: | |
# curl -s https://gist.githubusercontent.com/raulpy271/3a05c3fd138013fcc4edb9b8cbdc6ac1/raw/ee8b56ffbe54751402c766cf15a3a13bae6f1c7c/kill_discord.sh | bash | |
process='Discord' | |
proces_exist=`pidstat | grep -i $process` | |
if [ -n "$proces_exist" ] | |
then | |
echo "Bye $process :)" | |
killall $process -s 9 | |
else | |
echo "$process not found :(" | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment