summaryrefslogtreecommitdiff
path: root/rc.prosody/prosody-log
diff options
context:
space:
mode:
Diffstat (limited to 'rc.prosody/prosody-log')
-rw-r--r--rc.prosody/prosody-log/consumer-for1
-rw-r--r--rc.prosody/prosody-log/dependencies4
-rw-r--r--rc.prosody/prosody-log/env/CMD1
-rw-r--r--rc.prosody/prosody-log/env/CMD_OPTS1
-rw-r--r--rc.prosody/prosody-log/env/LOGDIR_GROUP2
-rw-r--r--rc.prosody/prosody-log/env/LOGDIR_OWNER2
-rw-r--r--rc.prosody/prosody-log/env/LOGDIR_PATH2
-rw-r--r--rc.prosody/prosody-log/env/LOGDIR_PERMS2
-rw-r--r--rc.prosody/prosody-log/env/LOG_SCRIPT2
-rw-r--r--rc.prosody/prosody-log/notification-fd1
-rw-r--r--rc.prosody/prosody-log/pipeline-name1
-rw-r--r--rc.prosody/prosody-log/run24
-rw-r--r--rc.prosody/prosody-log/type1
13 files changed, 44 insertions, 0 deletions
diff --git a/rc.prosody/prosody-log/consumer-for b/rc.prosody/prosody-log/consumer-for
new file mode 100644
index 0000000..4066033
--- /dev/null
+++ b/rc.prosody/prosody-log/consumer-for
@@ -0,0 +1 @@
+prosody-srv
diff --git a/rc.prosody/prosody-log/dependencies b/rc.prosody/prosody-log/dependencies
new file mode 100644
index 0000000..dc2488d
--- /dev/null
+++ b/rc.prosody/prosody-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.prosody/prosody-log/env/CMD b/rc.prosody/prosody-log/env/CMD
new file mode 100644
index 0000000..9d5239c
--- /dev/null
+++ b/rc.prosody/prosody-log/env/CMD
@@ -0,0 +1 @@
+s6-log
diff --git a/rc.prosody/prosody-log/env/CMD_OPTS b/rc.prosody/prosody-log/env/CMD_OPTS
new file mode 100644
index 0000000..00d672e
--- /dev/null
+++ b/rc.prosody/prosody-log/env/CMD_OPTS
@@ -0,0 +1 @@
+-d3
diff --git a/rc.prosody/prosody-log/env/LOGDIR_GROUP b/rc.prosody/prosody-log/env/LOGDIR_GROUP
new file mode 100644
index 0000000..3794bcd
--- /dev/null
+++ b/rc.prosody/prosody-log/env/LOGDIR_GROUP
@@ -0,0 +1,2 @@
+root
+# Logging directory group ownership
diff --git a/rc.prosody/prosody-log/env/LOGDIR_OWNER b/rc.prosody/prosody-log/env/LOGDIR_OWNER
new file mode 100644
index 0000000..9f9fd12
--- /dev/null
+++ b/rc.prosody/prosody-log/env/LOGDIR_OWNER
@@ -0,0 +1,2 @@
+root
+# Logging directory owner
diff --git a/rc.prosody/prosody-log/env/LOGDIR_PATH b/rc.prosody/prosody-log/env/LOGDIR_PATH
new file mode 100644
index 0000000..01c418f
--- /dev/null
+++ b/rc.prosody/prosody-log/env/LOGDIR_PATH
@@ -0,0 +1,2 @@
+/var/log/prosody
+# Logging directory path
diff --git a/rc.prosody/prosody-log/env/LOGDIR_PERMS b/rc.prosody/prosody-log/env/LOGDIR_PERMS
new file mode 100644
index 0000000..ccece6e
--- /dev/null
+++ b/rc.prosody/prosody-log/env/LOGDIR_PERMS
@@ -0,0 +1,2 @@
+750
+# Logging directory access rights in octal
diff --git a/rc.prosody/prosody-log/env/LOG_SCRIPT b/rc.prosody/prosody-log/env/LOG_SCRIPT
new file mode 100644
index 0000000..948a563
--- /dev/null
+++ b/rc.prosody/prosody-log/env/LOG_SCRIPT
@@ -0,0 +1,2 @@
+n4 s500000 T $LOGDIR_PATH
+# Logging script used by s6-log
diff --git a/rc.prosody/prosody-log/notification-fd b/rc.prosody/prosody-log/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/rc.prosody/prosody-log/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/rc.prosody/prosody-log/pipeline-name b/rc.prosody/prosody-log/pipeline-name
new file mode 100644
index 0000000..49c3cb8
--- /dev/null
+++ b/rc.prosody/prosody-log/pipeline-name
@@ -0,0 +1 @@
+prosody
diff --git a/rc.prosody/prosody-log/run b/rc.prosody/prosody-log/run
new file mode 100644
index 0000000..2d163e7
--- /dev/null
+++ b/rc.prosody/prosody-log/run
@@ -0,0 +1,24 @@
+#!/bin/execlineb -P
+
+#################################################
+# Start a logging daemon for the prosody 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.prosody/prosody-log/type b/rc.prosody/prosody-log/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/rc.prosody/prosody-log/type
@@ -0,0 +1 @@
+longrun