Oggi sciopero
Tuesday, July 14th, 2009
Aderisco all’appello di Diritto alla Rete contro il D.D.l. Alfano, che cerca di imbavagliare internet

Aderisco all’appello di Diritto alla Rete contro il D.D.l. Alfano, che cerca di imbavagliare internet
Having found and read this forum thread, I’ve modified the script to:
#!/bin/bash
username=$(whoami)
function check_app {
proc="$(ps aux | grep $username | grep -v $0 | grep $1 | grep -v grep)"
if [ "$proc" != "" ]
then
echo "!!! Shutdown $1 first!"
exit 1
fi
}
function vacuum_mozillas {
echo "Vacuuming $1..."
find $2 -type f -name '*.sqlite' -exec sqlite3 {} VACUUM \;
}
check_app firefox
check_app thunderbird
vacuum_mozillas firefox ~/.mozilla/firefox/
vacuum_mozillas thunderbird ~/.thunderbird
echo 'Done!'
While it sensibly improves start up times, don’t expect too much.