avoid race conditions in PIDfiles and update initscript (bb #404)