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
commit801cd758757348f55e0768f36b2fb18bd022f2ca (patch)
treea5b008f3a36a20a6ed13826d4738a2355877bf10
parent7b06b5a07e2d3ae581124655633c3106628ecb1d (diff)
downloadvyos-1x-mergify/bp/circinus/pr-3810.tar.gz
vyos-1x-mergify/bp/circinus/pr-3810.zip
op-mode: T6575: add support for NTP service restart via CLImergify/bp/circinus/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>