1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-10-27 05:23:39 -04:00
polybar/scripts/lemonbuddy_terminate.sh
2016-05-31 06:09:16 +02:00

17 lines
392 B
Bash
Executable file

#!/usr/bin/env bash
read -p "Send SIGKILL to terminate processes? [Y/n] " -r choice
[[ "${choice^^}" == "Y" ]] || {
echo "Aborting..."
exit
}
[[ "${choice^^}" == "Y" ]] && {
pgrep -f "(lemonbuddy_wrapper.sh|^lemonb(uddy|ar))" | xargs kill -9 >/dev/null 2>&1
if [[ $? -eq 0 ]]; then
echo "Kill signals successfully sent"
else
echo "Failed to send kill signal ($?)"
fi
}