summaryrefslogtreecommitdiff
path: root/src/conf_mode/interfaces-openvpn.py
diff options
context:
space:
mode:
authorKim Hagen <kim@sentrium.io>2021-09-02 09:58:42 -0500
committerKim Hagen <kim@sentrium.io>2021-09-02 09:58:42 -0500
commite3c71af1466da42403fa23bc23e7e530df71c6c8 (patch)
tree7f2c6072abadfaf876887be48e22d712ffdb3784 /src/conf_mode/interfaces-openvpn.py
parent87ee779a977e6b643d4131eb5d89b1264c3bdf55 (diff)
downloadvyos-1x-e3c71af1466da42403fa23bc23e7e530df71c6c8.tar.gz
vyos-1x-e3c71af1466da42403fa23bc23e7e530df71c6c8.zip
remove secrets file if the tunnel is deleted and fix opmode commands
Diffstat (limited to 'src/conf_mode/interfaces-openvpn.py')
-rwxr-xr-xsrc/conf_mode/interfaces-openvpn.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-openvpn.py b/src/conf_mode/interfaces-openvpn.py
index efab07ddc..194126a34 100755
--- a/src/conf_mode/interfaces-openvpn.py
+++ b/src/conf_mode/interfaces-openvpn.py
@@ -177,6 +177,10 @@ def verify_pki(openvpn):
def verify(openvpn):
if 'deleted' in openvpn:
+ # remove totp secrets file if totp is not configured
+ if os.path.isfile(otp_file.format(**openvpn)):
+ os.remove(otp_file.format(**openvpn))
+
verify_bridge_delete(openvpn)
return None