#!/bin/bash

######################################################
#                                                    #
# script of cPanel installation to CloudLinux system #
#                                                    #
######################################################

CURRENT_DIR=$(pwd)
echo -n "WGET AND PERL installation...    "
yum install wget perl -y &>/dev/null
echo "Ok"

#get cPanel latest installer
cd /home
wget -N http://layer1.cpanel.net/latest

echo "CentOS release 5.4 (Final)" > /etc/redhat-release

sh latest

echo ""
echo "See http://docs.cpanel.net/twiki/bin/view/AllDocumentation/InstallationGuide/Quick-StartInstallationGuide#Installing_cPanel_WHM for more information"

cd "$CURRENT_DIR"