blob: 9f828e1eeff413b59ca683befc42124a9b43e08a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
multi:
type: txt
help: "IP address of NTP server"
# should help be "domain name" instead of "ip address", or change type to ipv4?
create: "sh -c \"touch /etc/ntp/ntp.conf && \
if ! grep -q 'server.*$(@)' /etc/ntp/ntp.conf; then \
echo \\\"server $(@)\\\" >> /etc/ntp/ntp.conf && \
/opt/vyatta/sbin/ntpd.init restart; fi\" "
update: "sh -c \"touch /etc/ntp/ntp.conf && \
if ! grep -q 'server.*$(@)' /etc/ntp/ntp.conf; then \
echo \\\"server $(@)\\\" >> /etc/ntp/ntp.conf && \
/opt/vyatta/sbin/ntpd.init restart; fi\" "
delete: "sh -c \"touch /etc/ntp/ntp.conf && \
if grep -q 'server.*$(@)' /etc/ntp/ntp.conf; then \
sed -i '/server $(@)/d' /etc/ntp/ntp.conf && \
/opt/vyatta/sbin/ntpd.init restart; fi\" "
|