summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-12 20:33:03 +0200
committerChristian Poessinger <christian@poessinger.com>2020-04-12 20:33:24 +0200
commitad489280ba7f4511016883c24a6d0b06b6659df8 (patch)
tree1a61be8d2dfd4f5ccc108286def4f24b205e756b /src
parent254faff9678eb03cd212f6e4b08f8502bd28b492 (diff)
downloadvyos-1x-ad489280ba7f4511016883c24a6d0b06b6659df8.tar.gz
vyos-1x-ad489280ba7f4511016883c24a6d0b06b6659df8.zip
vpn: l2tp: T2185: move generated files to volatile /run/accel-ppp directory
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/vpn_l2tp.py8
-rw-r--r--src/systemd/accel-ppp-l2tp.service14
2 files changed, 4 insertions, 18 deletions
diff --git a/src/conf_mode/vpn_l2tp.py b/src/conf_mode/vpn_l2tp.py
index 7ecd8b2a4..4595c13a7 100755
--- a/src/conf_mode/vpn_l2tp.py
+++ b/src/conf_mode/vpn_l2tp.py
@@ -31,8 +31,8 @@ from vyos.util import call
from vyos.validate import is_ipv4
from vyos import ConfigError
-l2tp_conf = '/etc/accel-ppp/l2tp.conf'
-l2tp_chap_secrets = '/etc/accel-ppp/l2tp.chap-secrets'
+l2tp_conf = '/run/accel-pppd/l2tp.conf'
+l2tp_chap_secrets = '/run/accel-pppd/l2tp.chap-secrets'
default_config_data = {
'auth_mode': 'local',
@@ -375,7 +375,7 @@ def generate(l2tp):
def apply(l2tp):
if not l2tp:
- call('systemctl stop accel-ppp-l2tp.service')
+ call('systemctl stop accel-ppp@l2tp.service')
if os.path.exists(l2tp_conf):
os.unlink(l2tp_conf)
@@ -385,7 +385,7 @@ def apply(l2tp):
return None
- call('systemctl restart accel-ppp-l2tp.service')
+ call('systemctl restart accel-ppp@l2tp.service')
if __name__ == '__main__':
try:
diff --git a/src/systemd/accel-ppp-l2tp.service b/src/systemd/accel-ppp-l2tp.service
deleted file mode 100644
index 27f0cc8c0..000000000
--- a/src/systemd/accel-ppp-l2tp.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=Accel-PPP/L2TP
-After=vyos-router.service
-
-[Service]
-ExecStart=/usr/sbin/accel-pppd -d -p /run/accel-pppd-l2tp.pid -c /etc/accel-ppp/l2tp.conf
-ExecReload=/bin/kill -SIGUSR1 $MAINPID
-PIDFile=/run/accel-pppd-l2tp.pid
-Type=forking
-Restart=always
-
-[Install]
-WantedBy=multi-user.target
-Alias=accel-ppp-l2tp.service