##############################Deploy ntp server ######################## echo "start deploy ntp server" yum install -y ntp if [ ! -f /var/log/ntpd.log ];then touch /var/log/ntpd.log fi chown ntp:ntp /var/log/ntpd.log cat $basepath/package/ntp.conf > /etc/ntp.conf systemctl restart ntpd systemctl enable ntpd ntppid=`ps aux|grep ntp|grep -v "grep"|awk ‘{print $2}‘` if [ "$ntppid" ];then echo "success ! ntp-server is running now" fi