blob: 7a4ddad74f4ab97b263fc6d07f0302febe07e714 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
priority: 400
help: Network Time Protocol (NTP) configuration
end:
/opt/vyatta/sbin/vyatta_update_ntp.pl </etc/ntp.conf >/tmp/ntp.conf
sudo cp -b /tmp/ntp.conf /etc/ntp.conf
if grep -q '^server' /etc/ntp.conf
then
if pgrep -f -u ntp /usr/sbin/ntpd > /dev/null
then
sudo /usr/sbin/invoke-rc.d ntp force-reload
else
sudo /usr/sbin/invoke-rc.d ntp start
fi
else
sudo /usr/sbin/invoke-rc.d ntp stop
fi
rm -f /tmp/ntp.conf
|