Add function to find the pid of an application better than just pgrep. Add function to kill the offlineimap process.