summaryrefslogtreecommitdiff
path: root/rc.redis/redis/template/log
diff options
context:
space:
mode:
Diffstat (limited to 'rc.redis/redis/template/log')
-rw-r--r--rc.redis/redis/template/log/env/CMD1
-rw-r--r--rc.redis/redis/template/log/env/CMD_OPTS1
-rw-r--r--rc.redis/redis/template/log/env/LOGDIR_GROUP2
-rw-r--r--rc.redis/redis/template/log/env/LOGDIR_OWNER2
-rw-r--r--rc.redis/redis/template/log/env/LOGDIR_PATH2
-rw-r--r--rc.redis/redis/template/log/env/LOGDIR_PERMS2
-rw-r--r--rc.redis/redis/template/log/env/LOG_SCRIPT2
-rw-r--r--rc.redis/redis/template/log/notification-fd1
-rwxr-xr-xrc.redis/redis/template/log/run25
-rw-r--r--rc.redis/redis/template/log/type1
10 files changed, 39 insertions, 0 deletions
diff --git a/rc.redis/redis/template/log/env/CMD b/rc.redis/redis/template/log/env/CMD
new file mode 100644
index 0000000..9d5239c
--- /dev/null
+++ b/rc.redis/redis/template/log/env/CMD
@@ -0,0 +1 @@
+s6-log
diff --git a/rc.redis/redis/template/log/env/CMD_OPTS b/rc.redis/redis/template/log/env/CMD_OPTS
new file mode 100644
index 0000000..00d672e
--- /dev/null
+++ b/rc.redis/redis/template/log/env/CMD_OPTS
@@ -0,0 +1 @@
+-d3
diff --git a/rc.redis/redis/template/log/env/LOGDIR_GROUP b/rc.redis/redis/template/log/env/LOGDIR_GROUP
new file mode 100644
index 0000000..3794bcd
--- /dev/null
+++ b/rc.redis/redis/template/log/env/LOGDIR_GROUP
@@ -0,0 +1,2 @@
+root
+# Logging directory group ownership
diff --git a/rc.redis/redis/template/log/env/LOGDIR_OWNER b/rc.redis/redis/template/log/env/LOGDIR_OWNER
new file mode 100644
index 0000000..9f9fd12
--- /dev/null
+++ b/rc.redis/redis/template/log/env/LOGDIR_OWNER
@@ -0,0 +1,2 @@
+root
+# Logging directory owner
diff --git a/rc.redis/redis/template/log/env/LOGDIR_PATH b/rc.redis/redis/template/log/env/LOGDIR_PATH
new file mode 100644
index 0000000..5bd5897
--- /dev/null
+++ b/rc.redis/redis/template/log/env/LOGDIR_PATH
@@ -0,0 +1,2 @@
+/var/log/redis/${port}
+# Logging directory path
diff --git a/rc.redis/redis/template/log/env/LOGDIR_PERMS b/rc.redis/redis/template/log/env/LOGDIR_PERMS
new file mode 100644
index 0000000..ccece6e
--- /dev/null
+++ b/rc.redis/redis/template/log/env/LOGDIR_PERMS
@@ -0,0 +1,2 @@
+750
+# Logging directory access rights in octal
diff --git a/rc.redis/redis/template/log/env/LOG_SCRIPT b/rc.redis/redis/template/log/env/LOG_SCRIPT
new file mode 100644
index 0000000..948a563
--- /dev/null
+++ b/rc.redis/redis/template/log/env/LOG_SCRIPT
@@ -0,0 +1,2 @@
+n4 s500000 T $LOGDIR_PATH
+# Logging script used by s6-log
diff --git a/rc.redis/redis/template/log/notification-fd b/rc.redis/redis/template/log/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/rc.redis/redis/template/log/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/rc.redis/redis/template/log/run b/rc.redis/redis/template/log/run
new file mode 100755
index 0000000..f05f9eb
--- /dev/null
+++ b/rc.redis/redis/template/log/run
@@ -0,0 +1,25 @@
+#!/bin/execlineb -WS1
+
+###############################################
+# Start a logging daemon for the redis daemon #
+###############################################
+
+s6-envdir env
+multisubstitute {
+ importas -iu LOGDIR_OWNER LOGDIR_OWNER
+ importas -iu LOGDIR_GROUP LOGDIR_GROUP
+ importas -iu LOGDIR_PERMS LOGDIR_PERMS
+ importas -iu CMD CMD
+ importas -usCd" " CMD_OPTS CMD_OPTS
+ importas -iusCd" " LOG_SCRIPT LOG_SCRIPT
+}
+s6-envuidgid -Bi ${LOGDIR_OWNER}:${LOGDIR_GROUP}
+multisubstitute {
+ importas -iu LOGDIR_PATH LOGDIR_PATH
+ importas -iu UID UID
+ importas -iu GID GID
+}
+backtick -E port { dirname $1 }
+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.redis/redis/template/log/type b/rc.redis/redis/template/log/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/rc.redis/redis/template/log/type
@@ -0,0 +1 @@
+longrun