diff options
Diffstat (limited to 'src/conf_mode/vpn_pptp.py')
-rwxr-xr-x | src/conf_mode/vpn_pptp.py | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/conf_mode/vpn_pptp.py b/src/conf_mode/vpn_pptp.py index 15b80f984..8108a9670 100755 --- a/src/conf_mode/vpn_pptp.py +++ b/src/conf_mode/vpn_pptp.py @@ -23,7 +23,7 @@ from time import sleep from vyos.config import Config from vyos import ConfigError -from vyos.util import run +from vyos.util import run, get_half_cpus from vyos.template import render @@ -79,6 +79,7 @@ def get_config(): 'wins': [], 'client_ip_pool': '', 'mtu': '1436', + 'thread_cnt': get_half_cpus() } ### general options ### @@ -206,18 +207,6 @@ def generate(c): if c == None: return None - # accel-cmd reload doesn't work so any change results in a restart of the daemon - try: - if os.cpu_count() == 1: - c['thread_cnt'] = 1 - else: - c['thread_cnt'] = int(os.cpu_count()/2) - except KeyError: - if os.cpu_count() == 1: - c['thread_cnt'] = 1 - else: - c['thread_cnt'] = int(os.cpu_count()/2) - render(pptp_conf, 'pptp/pptp.config.tmpl', c, trim_blocks=True) if c['authentication']['local-users']: |