#!/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
#!/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
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M