Kill process only when exist. Remove sudo. Sleep after executing resque:...

For slow VPS servers executing rake resque:start with background=yes is bad idea. We have to give some time to finish command before stoping connection to server. Sleep 3 for me works fine.