aboutsummaryrefslogtreecommitdiff
path: root/pppd
diff options
context:
space:
mode:
authorsinanmohd <pcmsinan@gmail.com>2023-03-01 19:59:10 +0530
committersinanmohd <pcmsinan@gmail.com>2023-03-01 19:59:10 +0530
commitd0e06c7eea2b301845c38b481f0076097e069606 (patch)
treec112a9461495afa929d13027858d0fa20b641f30 /pppd
parent9bb6b9f7d5246c7a896c909c40370dc75644d4cf (diff)
pppd: add s6 serviceHEADmaster
Diffstat (limited to 'pppd')
-rw-r--r--pppd/pppd-log/consumer-for1
-rw-r--r--pppd/pppd-log/notification-fd1
-rw-r--r--pppd/pppd-log/pipeline-name1
-rw-r--r--pppd/pppd-log/run9
-rw-r--r--pppd/pppd-log/type1
-rw-r--r--pppd/pppd-srv/producer-for1
-rw-r--r--pppd/pppd-srv/run5
-rw-r--r--pppd/pppd-srv/type1
-rw-r--r--pppd/pppd.conf5
9 files changed, 25 insertions, 0 deletions
diff --git a/pppd/pppd-log/consumer-for b/pppd/pppd-log/consumer-for
new file mode 100644
index 0000000..c17019b
--- /dev/null
+++ b/pppd/pppd-log/consumer-for
@@ -0,0 +1 @@
+pppd-srv
diff --git a/pppd/pppd-log/notification-fd b/pppd/pppd-log/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/pppd/pppd-log/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/pppd/pppd-log/pipeline-name b/pppd/pppd-log/pipeline-name
new file mode 100644
index 0000000..5666003
--- /dev/null
+++ b/pppd/pppd-log/pipeline-name
@@ -0,0 +1 @@
+pppd
diff --git a/pppd/pppd-log/run b/pppd/pppd-log/run
new file mode 100644
index 0000000..50ee7d8
--- /dev/null
+++ b/pppd/pppd-log/run
@@ -0,0 +1,9 @@
+#!/bin/execlineb -P
+envfile /etc/s6/config/pppd.conf
+importas -sCuD "n3 s2000000 T" DIRECTIVES DIRECTIVES
+ifelse { test -w /var/log } {
+ foreground { install -d -o s6log -g s6log /var/log/pppd }
+ s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /var/log/pppd
+}
+foreground { install -d -o s6log -g s6log /run/log/pppd }
+s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /run/log/pppd
diff --git a/pppd/pppd-log/type b/pppd/pppd-log/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/pppd/pppd-log/type
@@ -0,0 +1 @@
+longrun
diff --git a/pppd/pppd-srv/producer-for b/pppd/pppd-srv/producer-for
new file mode 100644
index 0000000..026af7b
--- /dev/null
+++ b/pppd/pppd-srv/producer-for
@@ -0,0 +1 @@
+pppd-log
diff --git a/pppd/pppd-srv/run b/pppd/pppd-srv/run
new file mode 100644
index 0000000..0a74e04
--- /dev/null
+++ b/pppd/pppd-srv/run
@@ -0,0 +1,5 @@
+#!/bin/execlineb -P
+envfile /etc/s6/config/pppd.conf
+importas -sCuD "" OPTS OPTS
+fdmove -c 2 1
+exec pppd nodetach ${OPTS}
diff --git a/pppd/pppd-srv/type b/pppd/pppd-srv/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/pppd/pppd-srv/type
@@ -0,0 +1 @@
+longrun
diff --git a/pppd/pppd.conf b/pppd/pppd.conf
new file mode 100644
index 0000000..0b54125
--- /dev/null
+++ b/pppd/pppd.conf
@@ -0,0 +1,5 @@
+# Optional arguments for pppd
+OPTS="call provider"
+
+# This configures the directives used for s6-log in the log service.
+DIRECTIVES="n3 s2000000 T"