fixed init script .. made it similar to beacon init script