summaryrefslogtreecommitdiff
path: root/templates/system/ntp-server/node.def
diff options
context:
space:
mode:
Diffstat (limited to 'templates/system/ntp-server/node.def')
-rw-r--r--templates/system/ntp-server/node.def10
1 files changed, 5 insertions, 5 deletions
diff --git a/templates/system/ntp-server/node.def b/templates/system/ntp-server/node.def
index 230dd313..b121d3c3 100644
--- a/templates/system/ntp-server/node.def
+++ b/templates/system/ntp-server/node.def
@@ -1,12 +1,12 @@
multi:
type: txt
help: "Name or IP address of NTP server"
-update: "touch /etc/ntp.conf && \
+update: "sudo sh -c \"touch /etc/ntp.conf && \
if ! grep -q 'server.*$(@)' /etc/ntp.conf; then \
- echo \"server $(@)\" >> /etc/ntp.conf && \
+ echo \\\"server $(@)\\\" >> /etc/ntp.conf && \
/usr/sbin/invoke-rc.d ntp restart; \
-fi"
-delete: "touch /etc/ntp.conf && \
+fi\" "
+delete: "sudo sh -c \"touch /etc/ntp.conf && \
if grep -q 'server.*$(@)' /etc/ntp.conf; then \
sed -i '/server $(@)/d' /etc/ntp.conf && \
if grep -q '^server ' /etc/ntp.conf; then \
@@ -14,4 +14,4 @@ if grep -q 'server.*$(@)' /etc/ntp.conf; then \
else \
/usr/sbin/invoke-rc.d ntp stop; \
fi; \
-fi"
+fi\" "