summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-07-15 10:02:12 +0200
committerGitHub <noreply@github.com>2024-07-15 10:02:12 +0200
commit79d5230d3d91362e6292a1eb394b0beb7c38ef45 (patch)
treef8d824680b09c278f675c1be4e66098a49ae531f /op-mode-definitions
parent2fdcf50263bc94e8e1742fd9450318fa021b2860 (diff)
parentca4f4343999bdbd8450ef952f42062877d6f3bab (diff)
downloadvyos-1x-79d5230d3d91362e6292a1eb394b0beb7c38ef45.tar.gz
vyos-1x-79d5230d3d91362e6292a1eb394b0beb7c38ef45.zip
Merge pull request #3810 from c-po/restart-ntp
op-mode: T6575: add support for NTP service restart via CLI
Diffstat (limited to 'op-mode-definitions')
-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>