Better os support init.d

The init.d script fails (at least) on SmartOS, probaply also on other Solaris derivates.

This patch makes the init script work on SmartOS. All changes have been testet in Ubuntu.