diff options
author | Christian Breunig <christian@breunig.cc> | 2024-02-07 21:45:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-07 21:45:11 +0100 |
commit | 8e2fb45d777745423461134c16a156243389d10d (patch) | |
tree | c76f63c7217f64e5b26b861abc104c6da07d21f2 /src/conf_mode | |
parent | a0b0a77e004e567e99e57bf7414986ed01837c56 (diff) | |
parent | ca7a3ea497b6344a502f82a058508c8fed049b71 (diff) | |
download | vyos-1x-8e2fb45d777745423461134c16a156243389d10d.tar.gz vyos-1x-8e2fb45d777745423461134c16a156243389d10d.zip |
Merge pull request #2958 from vyos/mergify/bp/sagitta/pr-2944
vpn: T3843: l2tp configuration not cleared after delete (backport #2944)
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/vpn_l2tp.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/conf_mode/vpn_l2tp.py b/src/conf_mode/vpn_l2tp.py index 36b3d2a30..4ca717814 100755 --- a/src/conf_mode/vpn_l2tp.py +++ b/src/conf_mode/vpn_l2tp.py @@ -19,6 +19,7 @@ import os from sys import exit from vyos.config import Config +from vyos.configdep import call_dependents, set_dependents from vyos.configdict import get_accel_dict from vyos.template import render from vyos.utils.process import call @@ -42,6 +43,9 @@ def get_config(config=None): else: conf = Config() base = ['vpn', 'l2tp', 'remote-access'] + + set_dependents('ipsec', conf) + if not conf.exists(base): return None @@ -94,10 +98,10 @@ def apply(l2tp): for file in [l2tp_chap_secrets, l2tp_conf]: if os.path.exists(file): os.unlink(file) + else: + call('systemctl restart accel-ppp@l2tp.service') - return None - - call('systemctl restart accel-ppp@l2tp.service') + call_dependents() if __name__ == '__main__': |