summaryrefslogtreecommitdiff
path: root/op-mode-definitions/restart-ssh.xml.in
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-01-15 21:36:49 +0100
committerChristian Poessinger <christian@poessinger.com>2021-01-15 21:36:49 +0100
commit3ce7a8c6e55d7296fc9155a6b8ca913d4a08b1ab (patch)
tree0a87fd1742547e295999dcfa2020a62e30acffdf /op-mode-definitions/restart-ssh.xml.in
parent79a02470c4f9f2184913a959545b54a2dfd76d1e (diff)
downloadvyos-1x-3ce7a8c6e55d7296fc9155a6b8ca913d4a08b1ab.tar.gz
vyos-1x-3ce7a8c6e55d7296fc9155a6b8ca913d4a08b1ab.zip
ssh: T631: add op-mode "restart ssh" command
Diffstat (limited to 'op-mode-definitions/restart-ssh.xml.in')
-rw-r--r--op-mode-definitions/restart-ssh.xml.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/op-mode-definitions/restart-ssh.xml.in b/op-mode-definitions/restart-ssh.xml.in
new file mode 100644
index 000000000..6504cc18a
--- /dev/null
+++ b/op-mode-definitions/restart-ssh.xml.in
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="restart">
+ <children>
+ <node name="ssh">
+ <properties>
+ <help>Restart SSH service</help>
+ </properties>
+ <command>if cli-shell-api existsActive service ssh; then sudo systemctl restart ssh.service; else echo "Service SSH not configured"; fi</command>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>