diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-01-15 21:36:49 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-01-15 21:37:28 +0100 |
commit | 14b0aecb65a043538f9c99b2d8d382616f9fbad4 (patch) | |
tree | a6dfc9f2454944e819e1c9a9666f2d84810d8b5d /op-mode-definitions | |
parent | 9b0906f06f426909f43b97e63ca14261292e7ea2 (diff) | |
download | vyos-1x-14b0aecb65a043538f9c99b2d8d382616f9fbad4.tar.gz vyos-1x-14b0aecb65a043538f9c99b2d8d382616f9fbad4.zip |
ssh: T631: add op-mode "restart ssh" command
(cherry picked from commit 3ce7a8c6e55d7296fc9155a6b8ca913d4a08b1ab)
Diffstat (limited to 'op-mode-definitions')
-rw-r--r-- | op-mode-definitions/restart-ssh.xml.in | 13 |
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> |