From 21efcfc5ef3466e4bbdb5758e9f21af14337e583 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sat, 14 Jun 2025 22:13:48 +0200 Subject: Add templated redis --- rc.redis/redis/template/log/run | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 rc.redis/redis/template/log/run (limited to 'rc.redis/redis/template/log/run') 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 -- cgit v1.2.3