summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-08-17 02:15:51 +0200
committerChristian Poessinger <christian@poessinger.com>2019-08-17 02:15:51 +0200
commitdbffd657b46fe0edcba67141bf87173448043b70 (patch)
tree1dbee61b2a3995d51a1d5385cbfbdcd0769ba181
parent1fea0d1cd6232033bde839642446fad162f6f8c8 (diff)
downloadvyos-1x-dbffd657b46fe0edcba67141bf87173448043b70.tar.gz
vyos-1x-dbffd657b46fe0edcba67141bf87173448043b70.zip
openvpn: T1548: add op-mode command for resetting
vyos@vyos:~$ reset openvpn interface vtun10
-rw-r--r--op-mode-definitions/openvpn.xml9
1 files changed, 9 insertions, 0 deletions
diff --git a/op-mode-definitions/openvpn.xml b/op-mode-definitions/openvpn.xml
index 9c9c3b3ad..4a7f985e9 100644
--- a/op-mode-definitions/openvpn.xml
+++ b/op-mode-definitions/openvpn.xml
@@ -58,6 +58,15 @@
</properties>
<command>echo kill $4 | socat - UNIX-CONNECT:/tmp/openvpn-mgmt-intf > /dev/null</command>
</tagNode>
+ <tagNode name="interface">
+ <properties>
+ <help>Reset OpenVPN process on interface</help>
+ <completionHelp>
+ <script>sudo ${vyos_completion_dir}/list_interfaces.py --type openvpn</script>
+ </completionHelp>
+ </properties>
+ <command>sudo kill -SIGUSR1 $(cat /var/run/openvpn/$4.pid)</command>
+ </tagNode>
</children>
</node>
</children>