diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-04-11 19:13:39 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-04-11 19:13:39 +0200 |
commit | 0edca98b751faa3f3817fe4899d2822daade4212 (patch) | |
tree | 673436a5f0f11661750811bd03e16dd034f2cd7c /src/conf_mode/vpn_sstp.py | |
parent | 07080afd4015a900fb7474e1c81008f58b478565 (diff) | |
download | vyos-1x-0edca98b751faa3f3817fe4899d2822daade4212.tar.gz vyos-1x-0edca98b751faa3f3817fe4899d2822daade4212.zip |
vpn: l2tp: sstp: T2264: create config dir on demand
Diffstat (limited to 'src/conf_mode/vpn_sstp.py')
-rwxr-xr-x | src/conf_mode/vpn_sstp.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/conf_mode/vpn_sstp.py b/src/conf_mode/vpn_sstp.py index a0bcb1acf..b2eb5bdcb 100755 --- a/src/conf_mode/vpn_sstp.py +++ b/src/conf_mode/vpn_sstp.py @@ -305,6 +305,10 @@ def generate(sstp): fs_loader = FileSystemLoader(tmpl_path) env = Environment(loader=fs_loader, trim_blocks=True) + dirname = os.path.dirname(sstp_conf) + if not os.path.exists(dirname): + os.mkdir(dirname) + # accel-cmd reload doesn't work so any change results in a restart of the daemon tmpl = env.get_template('sstp.config.tmpl') config_text = tmpl.render(sstp) |