#!/bin/bash

NTPSERVER="202.120.2.101"

system=`cat /etc/issue|awk 'NR==1{print $1}'`

echo "Your System is $system."

if [ "$system" == "CentOS" ]; then

/usr/bin/yum -y install ntp

else

apt-get -y install ntp

fi

/usr/sbin/ntpdate $NTPSERVER