Converted cpanel.preinstall.sh to ruby