hc
2023-05-26 a23f51ed7a39e452c1037343a84d7db1ca2c5bd7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
 
/etc/init.d/S49ntp stop
 
while true
do
        ntpd=`ntpd -qgx4 202.108.6.95 58.220.207.226 47.92.108.218 202.112.29.82 120.25.108.11 182.92.12.11 115.28.122.198 \
                | grep 'ntpd: time'`
        if [[ "$ntpd" != "" ]]
        then
            touch /tmp/ntp_successful
            break
        fi
   sleep 1
done
 
#/usr/sbin/ntpd -p /run/ntpd.pid -g
/etc/init.d/S49ntp start