Fix process termination when started with start stop deamon