summaryrefslogtreecommitdiff
path: root/rc.nginx/nginx-log
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2025-05-23 16:16:13 +0200
committerEugen Wissner <belka@caraus.de>2025-05-23 16:16:13 +0200
commite151e4d898b908cce04480e2ef75d5f650c8049d (patch)
tree9d910a9e43de72aafa69c5c3e0d7342a4a07df51 /rc.nginx/nginx-log
parent7cab732b5e5c064117baa8b33fe7f27102bed9d4 (diff)
downloads6-e151e4d898b908cce04480e2ef75d5f650c8049d.tar.gz
Add nginx
Diffstat (limited to 'rc.nginx/nginx-log')
-rw-r--r--rc.nginx/nginx-log/consumer-for1
-rw-r--r--rc.nginx/nginx-log/dependencies4
-rw-r--r--rc.nginx/nginx-log/env/CMD1
-rw-r--r--rc.nginx/nginx-log/env/CMD_OPTS1
-rw-r--r--rc.nginx/nginx-log/env/LOGDIR_GROUP2
-rw-r--r--rc.nginx/nginx-log/env/LOGDIR_OWNER2
-rw-r--r--rc.nginx/nginx-log/env/LOGDIR_PATH2
-rw-r--r--rc.nginx/nginx-log/env/LOGDIR_PERMS2
-rw-r--r--rc.nginx/nginx-log/env/LOG_SCRIPT2
-rw-r--r--rc.nginx/nginx-log/notification-fd1
-rw-r--r--rc.nginx/nginx-log/pipeline-name1
-rw-r--r--rc.nginx/nginx-log/run24
-rw-r--r--rc.nginx/nginx-log/type1
13 files changed, 44 insertions, 0 deletions
diff --git a/rc.nginx/nginx-log/consumer-for b/rc.nginx/nginx-log/consumer-for
new file mode 100644
index 0000000..5253051
--- /dev/null
+++ b/rc.nginx/nginx-log/consumer-for
@@ -0,0 +1 @@
+nginx-srv
diff --git a/rc.nginx/nginx-log/dependencies b/rc.nginx/nginx-log/dependencies
new file mode 100644
index 0000000..e85efae
--- /dev/null
+++ b/rc.nginx/nginx-log/dependencies
@@ -0,0 +1,4 @@
+# Comment out "remount-root" and uncomment "local-fs"
+# if you use separate partition for /var/log
+remount-root
+#local-fs
diff --git a/rc.nginx/nginx-log/env/CMD b/rc.nginx/nginx-log/env/CMD
new file mode 100644
index 0000000..9d5239c
--- /dev/null
+++ b/rc.nginx/nginx-log/env/CMD
@@ -0,0 +1 @@
+s6-log
diff --git a/rc.nginx/nginx-log/env/CMD_OPTS b/rc.nginx/nginx-log/env/CMD_OPTS
new file mode 100644
index 0000000..00d672e
--- /dev/null
+++ b/rc.nginx/nginx-log/env/CMD_OPTS
@@ -0,0 +1 @@
+-d3
diff --git a/rc.nginx/nginx-log/env/LOGDIR_GROUP b/rc.nginx/nginx-log/env/LOGDIR_GROUP
new file mode 100644
index 0000000..3794bcd
--- /dev/null
+++ b/rc.nginx/nginx-log/env/LOGDIR_GROUP
@@ -0,0 +1,2 @@
+root
+# Logging directory group ownership
diff --git a/rc.nginx/nginx-log/env/LOGDIR_OWNER b/rc.nginx/nginx-log/env/LOGDIR_OWNER
new file mode 100644
index 0000000..9f9fd12
--- /dev/null
+++ b/rc.nginx/nginx-log/env/LOGDIR_OWNER
@@ -0,0 +1,2 @@
+root
+# Logging directory owner
diff --git a/rc.nginx/nginx-log/env/LOGDIR_PATH b/rc.nginx/nginx-log/env/LOGDIR_PATH
new file mode 100644
index 0000000..8e3722a
--- /dev/null
+++ b/rc.nginx/nginx-log/env/LOGDIR_PATH
@@ -0,0 +1,2 @@
+/var/log/nginx
+# Logging directory path
diff --git a/rc.nginx/nginx-log/env/LOGDIR_PERMS b/rc.nginx/nginx-log/env/LOGDIR_PERMS
new file mode 100644
index 0000000..ccece6e
--- /dev/null
+++ b/rc.nginx/nginx-log/env/LOGDIR_PERMS
@@ -0,0 +1,2 @@
+750
+# Logging directory access rights in octal
diff --git a/rc.nginx/nginx-log/env/LOG_SCRIPT b/rc.nginx/nginx-log/env/LOG_SCRIPT
new file mode 100644
index 0000000..948a563
--- /dev/null
+++ b/rc.nginx/nginx-log/env/LOG_SCRIPT
@@ -0,0 +1,2 @@
+n4 s500000 T $LOGDIR_PATH
+# Logging script used by s6-log
diff --git a/rc.nginx/nginx-log/notification-fd b/rc.nginx/nginx-log/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/rc.nginx/nginx-log/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/rc.nginx/nginx-log/pipeline-name b/rc.nginx/nginx-log/pipeline-name
new file mode 100644
index 0000000..68b7d12
--- /dev/null
+++ b/rc.nginx/nginx-log/pipeline-name
@@ -0,0 +1 @@
+nginx
diff --git a/rc.nginx/nginx-log/run b/rc.nginx/nginx-log/run
new file mode 100644
index 0000000..aad3b37
--- /dev/null
+++ b/rc.nginx/nginx-log/run
@@ -0,0 +1,24 @@
+#!/bin/execlineb -P
+
+###############################################
+# Start a logging daemon for the nginx daemon #
+###############################################
+
+s6-envdir env
+multisubstitute {
+ importas -u LOGDIR_OWNER LOGDIR_OWNER
+ importas -u LOGDIR_GROUP LOGDIR_GROUP
+ importas -u LOGDIR_PERMS LOGDIR_PERMS
+ importas -u CMD CMD
+ importas -usCd" " CMD_OPTS CMD_OPTS
+ importas -usCd" " LOG_SCRIPT LOG_SCRIPT
+}
+s6-envuidgid -B ${LOGDIR_OWNER}:${LOGDIR_GROUP}
+multisubstitute {
+ importas -u LOGDIR_PATH LOGDIR_PATH
+ importas -u UID UID
+ importas -u GID GID
+}
+if { install -dm $LOGDIR_PERMS -o $UID -g $GID $LOGDIR_PATH }
+s6-setuidgid ${UID}:${GID}
+exec -c $CMD $CMD_OPTS -- $LOG_SCRIPT
diff --git a/rc.nginx/nginx-log/type b/rc.nginx/nginx-log/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/rc.nginx/nginx-log/type
@@ -0,0 +1 @@
+longrun