activitywatch icon indicating copy to clipboard operation
activitywatch copied to clipboard

Here is a aw-stop script that will stop the aw processes

Open theguybieber opened this issue 9 years ago • 4 comments

Might be nice to have a stop script.

ps -ef | grep aw-server | grep -v grep | awk '{print $2}' | xargs kill -9
ps -ef | grep aw-watcher-afk | grep -v grep | awk '{print $2}' | xargs kill -9
ps -ef | grep aw-watcher-window | grep -v grep | awk '{print $2}' | xargs kill -9

aw-stop.txt

theguybieber avatar Jun 02 '17 18:06 theguybieber

Killing with -9 can lead to all sorts of trouble since it won't allow processes to exit cleanly. If you are going to use this, expect trouble sooner or later.

I usually just do killall aw-server aw-watcher-afk aw-watcher-window.

ErikBjare avatar Jun 02 '17 18:06 ErikBjare

Yeah killall didn't seem to work for me. I took the -9 off to avoid problems.

theguybieber avatar Jun 02 '17 18:06 theguybieber

Not sure if macOS has pkill, but if it does pkill aw-server or (pkill aw-(watcher|server) to match all of them) might work better.

ErikBjare avatar Jun 02 '17 18:06 ErikBjare

pkill should be available

https://unix.stackexchange.com/a/100759

johan-bjareholt avatar Jun 02 '17 19:06 johan-bjareholt