fixed groups handling when reading from file
fixed sh compatibility issue in init script