revamp init script. based on sickbeard init.ubuntu