#9: Update init.d script to work better on CentOS (based on changes suggested by Arthur)