##############################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
原文地址:https://www.cnblogs.com/weifeng1463/p/8603732.html
时间: 2024-11-13 10:39:08