summaryrefslogtreecommitdiff
path: root/src/etc/systemd/system/ppp@.service
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-12-01 10:43:02 +0100
committerChristian Poessinger <christian@poessinger.com>2020-02-23 14:36:56 +0100
commit426f9d33d24a163fc1fc169930d7b969abf846b0 (patch)
tree736780b423add5d94707680ddd1392e9d47285d4 /src/etc/systemd/system/ppp@.service
parent70049969d8e3c28c8ae7a342fa84eb35ed5c9e14 (diff)
downloadvyos-1x-426f9d33d24a163fc1fc169930d7b969abf846b0.tar.gz
vyos-1x-426f9d33d24a163fc1fc169930d7b969abf846b0.zip
pppoe: T1318: use systemd to manage connection
This reduces the amount of self written code to start-stop-daemon and also kill the process if it has no connection yet (there won't be a PID file in this case) and getting the proper PID for multiple processes would require me to walk the /proc/<pid>/cmdline for every binary involved.
Diffstat (limited to 'src/etc/systemd/system/ppp@.service')
-rw-r--r--src/etc/systemd/system/ppp@.service11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/etc/systemd/system/ppp@.service b/src/etc/systemd/system/ppp@.service
new file mode 100644
index 000000000..d271efb41
--- /dev/null
+++ b/src/etc/systemd/system/ppp@.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Dialing PPP connection %I
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/pppd call %I nodetach nolog
+Restart=on-failure
+RestartSec=5s
+
+[Install]
+WantedBy=multi-user.target