reworked logic for init script

Signed-off-by: Nathan Van Overloop <nathan.van.overloop@sensirius.com>
fix initscript does not handle pid nicely

Signed-off-by: Nathan Van Overloop <nathan.van.overloop@nexperteam.be>