summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-07-13 21:18:31 +0200
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-07-15 08:03:01 +0000
commitb798470001bfeb28edac13296e6fb35df8725684 (patch)
tree14cd1af3cb76e9d2dff1a4037aeb35609ae661cb
parent34671f40d23c55014e56948163a649c85848063c (diff)
downloadvyos-1x-b798470001bfeb28edac13296e6fb35df8725684.tar.gz
vyos-1x-b798470001bfeb28edac13296e6fb35df8725684.zip
op-mode: T6575: add support for NTP service restart via CLImergify/bp/sagitta/pr-3810
This seemed to be arround in the early days, but is not available since at least VyOS 1.3.3. Add CLI helper to restart the NTP process (chrony). (cherry picked from commit ca4f4343999bdbd8450ef952f42062877d6f3bab)
-rw-r--r--op-mode-definitions/restart-ntp.xml.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/op-mode-definitions/restart-ntp.xml.in b/op-mode-definitions/restart-ntp.xml.in
new file mode 100644
index 000000000..961fae252
--- /dev/null
+++ b/op-mode-definitions/restart-ntp.xml.in
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="restart">
+ <children>
+ <node name="ntp">
+ <properties>
+ <help>Restart NTP service</help>
+ </properties>
+ <command>if cli-shell-api existsActive service ntp; then sudo systemctl restart chrony.service; else echo "Service NTP not configured"; fi</command>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>