summaryrefslogtreecommitdiff
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:37:28 +0100
commit14b0aecb65a043538f9c99b2d8d382616f9fbad4 (patch)
treea6dfc9f2454944e819e1c9a9666f2d84810d8b5d
parent9b0906f06f426909f43b97e63ca14261292e7ea2 (diff)
downloadvyos-1x-14b0aecb65a043538f9c99b2d8d382616f9fbad4.tar.gz
vyos-1x-14b0aecb65a043538f9c99b2d8d382616f9fbad4.zip
ssh: T631: add op-mode "restart ssh" command
(cherry picked from commit 3ce7a8c6e55d7296fc9155a6b8ca913d4a08b1ab)
-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>