Last active
August 6, 2023 17:23
-
-
Save jivanpal/30af7741721e597575e10f5ef8560062 to your computer and use it in GitHub Desktop.
Stop Adobe Creative Cloud daemons (background processes) in their tracks
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 | |
if [ "$1" = "-s" ] || [ "$1" = "--show" ]; then | |
show=true | |
else | |
show=false | |
fi | |
if $show || [ "$1" = "-v" ] || [ "$1" = "--verbose" ]; then | |
verbose=true | |
else | |
verbose=false | |
fi | |
kill_list="" | |
for i in $(pgrep -i adobe); do | |
if $verbose; then | |
echo -n "PID $i -- " | |
ps -p "$i" -o command $($show || echo -c) | awk 'ORS=""; NR==2' | |
fi | |
ps -p "$i" -o command | awk 'NR==2' | grep -E '^/Applications/Adobe XD/Adobe XD\.app/Contents/MacOS/Adobe XD$' > /dev/null | |
if [ $? -eq 1 ] ; then | |
$verbose && echo " -- KILL" | |
kill_list="$kill_list $i" | |
else | |
$verbose && echo " -- KEEP ALIVE" | |
fi | |
done | |
if [ -z "$kill_list" ] ; then | |
$verbose && echo "Nothing to kill" | |
else | |
if $verbose; then | |
echo "KILL_LIST = $kill_list" | |
set -x | |
fi | |
$show || sudo kill -TERM $kill_list | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's a really great
kill-apps
helper from sunknudsen/privacy-guides that can be added to.zshrc
:paste above script into
~/.zshrc
and then runsource ~/.zshrc
. Then you can just use commands likekill-apps adobe
to kill all adobe related stuff.