fari
fari copied to clipboard
don't restart Safari
If left running and Safari is quit, it will reopen Safari repeatedly (and infuriatingly), including after crashes or when prompting you to restore windows or not.
Figured this out in another script. Something like this:
PROC=$(
ps ax | \
grep '/Applications/Safari.app/Contents/MacOS/Safari' | \
grep -v grep | \
wc -l
)
if [ $PROC -gt 0 ]; then
[...]