summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-07-15 16:22:33 +0200
committerGitHub <noreply@github.com>2024-07-15 16:22:33 +0200
commit95d345c6600aa83abd6d3138ab5ef49abb73b0f3 (patch)
treea5b008f3a36a20a6ed13826d4738a2355877bf10
parent7b06b5a07e2d3ae581124655633c3106628ecb1d (diff)
parent801cd758757348f55e0768f36b2fb18bd022f2ca (diff)
downloadvyos-1x-95d345c6600aa83abd6d3138ab5ef49abb73b0f3.tar.gz
vyos-1x-95d345c6600aa83abd6d3138ab5ef49abb73b0f3.zip
Merge pull request #3815 from vyos/mergify/bp/circinus/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>