Fix init script to run in CentOS, AmazonLinux