Made the init script a lot simpler and compatible with CentOS.