diff options
author | Daniil Baturin <daniil@baturin.org> | 2019-09-11 23:14:46 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2019-09-11 23:14:46 +0200 |
commit | a9a68a6f1086fd4c978deaf5ddace69c18443756 (patch) | |
tree | f3da329903d4e758408851f9b22c4834c130363f /op-mode-definitions/openvpn.xml | |
parent | 501908ae54a1aaae1337673617ebfcc281b02662 (diff) | |
parent | 59e5e64cfbb67a5eb1a9d4d21dd54d946897b8d7 (diff) | |
download | vyos-1x-a9a68a6f1086fd4c978deaf5ddace69c18443756.tar.gz vyos-1x-a9a68a6f1086fd4c978deaf5ddace69c18443756.zip |
Merge branch 'current' into equuleus
Diffstat (limited to 'op-mode-definitions/openvpn.xml')
-rw-r--r-- | op-mode-definitions/openvpn.xml | 64 |
1 files changed, 46 insertions, 18 deletions
diff --git a/op-mode-definitions/openvpn.xml b/op-mode-definitions/openvpn.xml index 4c958257a..368cc9115 100644 --- a/op-mode-definitions/openvpn.xml +++ b/op-mode-definitions/openvpn.xml @@ -2,25 +2,25 @@ <interfaceDefinition> <node name="generate"> <children> - <node name="openvpn"> - <properties> - <help>OpenVPN key generation tool</help> - </properties> - <children> - <tagNode name="key"> - <properties> - <help>Generate shared-secret key with specified file name</help> - <completionHelp> - <list><filename></list> - </completionHelp> - </properties> - <command> + <node name="openvpn"> + <properties> + <help>OpenVPN key generation tool</help> + </properties> + <children> + <tagNode name="key"> + <properties> + <help>Generate shared-secret key with specified file name</help> + <completionHelp> + <list><filename></list> + </completionHelp> + </properties> + <command> result=1; key_path=$4 full_path= # Prepend /config/auth if the path is not absolute - if echo $key_path | egrep -ve '^/.*' > /dev/null; then + if echo $key_path | egrep -ve '^/.*' > /dev/null; then full_path=/config/auth/$key_path else full_path=$key_path @@ -40,12 +40,15 @@ fi /usr/libexec/vyos/validators/file-exists --directory /config/auth "$full_path" </command> - </tagNode> - </children> - </node> + </tagNode> + </children> + </node> </children> </node> <node name="reset"> + <properties> + <help>Reset a service</help> + </properties> <children> <node name="openvpn"> <children> @@ -56,7 +59,7 @@ <script>sudo ${vyos_completion_dir}/list_openvpn_clients.py --all</script> </completionHelp> </properties> - <command>echo kill $4 | socat - UNIX-CONNECT:/tmp/openvpn-mgmt-intf > /dev/null</command> + <command>echo kill $4 | socat - UNIX-CONNECT:/tmp/openvpn-mgmt-intf > /dev/null</command> </tagNode> <tagNode name="interface"> <properties> @@ -107,6 +110,31 @@ </tagNode> </children> </node> + <node name="openvpn"> + <properties> + <help>Show OpenVPN information</help> + </properties> + <children> + <leafNode name="client"> + <properties> + <help>Show tunnel status for OpenVPN client interfaces</help> + </properties> + <command>sudo ${vyos_op_scripts_dir}/show_openvpn.py --mode=client</command> + </leafNode> + <leafNode name="server"> + <properties> + <help>Show tunnel status for OpenVPN server interfaces</help> + </properties> + <command>sudo ${vyos_op_scripts_dir}/show_openvpn.py --mode=server</command> + </leafNode> + <leafNode name="site-to-site"> + <properties> + <help>Show tunnel status for OpenVPN site-to-site interfaces</help> + </properties> + <command>sudo ${vyos_op_scripts_dir}/show_openvpn.py --mode=site-to-site</command> + </leafNode> + </children> + </node> </children> </node> </interfaceDefinition> |