aboutsummaryrefslogtreecommitdiff
path: root/rc.redis/redis/template/log/run
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2025-06-14 22:13:48 +0200
committerEugen Wissner <belka@caraus.de>2025-06-14 22:13:48 +0200
commit21efcfc5ef3466e4bbdb5758e9f21af14337e583 (patch)
tree2834fcf761646e8fbda93f5e246188a5c2aae2a2 /rc.redis/redis/template/log/run
parent22994bb8694b8aa8b1094f1e7f24f499816fa1a4 (diff)
downloads6-21efcfc5ef3466e4bbdb5758e9f21af14337e583.tar.gz
Add templated redis
Diffstat (limited to 'rc.redis/redis/template/log/run')
-rwxr-xr-xrc.redis/redis/template/log/run25
1 files changed, 25 insertions, 0 deletions
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