Skip to content
Snippets Groups Projects
test_ntp.sh 253 B
#!/bin/bash
source /root/envsetup/envsetup.conf

set -e

NTP_SERVER="$CUST_NTP1"
if [ "${NTP_SERVER}" = "" ]; then
    NTP_SERVER="ntp.ubuntu.com"
fi
echo "Testing NTP server: ${NTP_SERVER}"
service ntp stop
ntpdate -d ${NTP_SERVER}
service ntp restart