diff options
-rw-r--r-- | data/templates/accel-ppp/pppoe.config.tmpl | 4 | ||||
-rwxr-xr-x | src/services/vyos-http-api-server | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/data/templates/accel-ppp/pppoe.config.tmpl b/data/templates/accel-ppp/pppoe.config.tmpl index 537b2770d..b6a239fad 100644 --- a/data/templates/accel-ppp/pppoe.config.tmpl +++ b/data/templates/accel-ppp/pppoe.config.tmpl @@ -1,4 +1,3 @@ - ### generated by accel_pppoe.py ### [modules] log_syslog @@ -6,13 +5,13 @@ pppoe {% if auth_mode == 'radius' %} radius {% endif %} +chap-secrets ippool {% if ppp_ipv6 != 'deny' %} ipv6pool ipv6_nd ipv6_dhcp {% endif %} -chap-secrets auth_pap auth_chap_md5 auth_mschap_v1 @@ -87,6 +86,7 @@ wins{{ loop.index }}={{ server }} {% if auth_mode == 'local' %} [chap-secrets] +gw-ip-address={{ ppp_gw }} chap-secrets={{ chap_secrets_file }} {% elif auth_mode == 'radius' %} [radius] diff --git a/src/services/vyos-http-api-server b/src/services/vyos-http-api-server index b5ad8b159..a3624052e 100755 --- a/src/services/vyos-http-api-server +++ b/src/services/vyos-http-api-server @@ -22,6 +22,7 @@ import grp import json import traceback import threading +import signal import vyos.config @@ -350,6 +351,8 @@ def show_op(): return success(res) +def shutdown(): + raise KeyboardInterrupt if __name__ == '__main__': # systemd's user and group options don't work, do it by hand here, @@ -372,4 +375,9 @@ if __name__ == '__main__': app.config['vyos_keys'] = server_config['api_keys'] app.config['vyos_debug'] = server_config['debug'] + def sig_handler(signum, frame): + shutdown() + + signal.signal(signal.SIGTERM, sig_handler) + bottle.run(app, host=server_config["listen_address"], port=server_config["port"], debug=True) |