summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-07-16 09:26:45 +0100
committerGitHub <noreply@github.com>2024-07-16 09:26:45 +0100
commitb81fa2e6ca3f90caeddb5ff6e5d8b2b021653756 (patch)
tree14cd1af3cb76e9d2dff1a4037aeb35609ae661cb
parent34671f40d23c55014e56948163a649c85848063c (diff)
parentb798470001bfeb28edac13296e6fb35df8725684 (diff)
downloadvyos-1x-b81fa2e6ca3f90caeddb5ff6e5d8b2b021653756.tar.gz
vyos-1x-b81fa2e6ca3f90caeddb5ff6e5d8b2b021653756.zip
Merge pull request #3814 from vyos/mergify/bp/sagitta/pr-3810
op-mode: T6575: add support for NTP service restart via CLI (backport #3810)
-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>