Add templated redis

This commit is contained in:
2025-06-14 22:13:48 +02:00
parent 22994bb869
commit 21efcfc5ef
26 changed files with 120 additions and 0 deletions

1
rc.redis/redis/template/log/env/CMD vendored Normal file
View File

@ -0,0 +1 @@
s6-log

View File

@ -0,0 +1 @@
-d3

View File

@ -0,0 +1,2 @@
root
# Logging directory group ownership

View File

@ -0,0 +1,2 @@
root
# Logging directory owner

View File

@ -0,0 +1,2 @@
/var/log/redis/${port}
# Logging directory path

View File

@ -0,0 +1,2 @@
750
# Logging directory access rights in octal

View File

@ -0,0 +1,2 @@
n4 s500000 T $LOGDIR_PATH
# Logging script used by s6-log

View File

@ -0,0 +1 @@
3

25
rc.redis/redis/template/log/run Executable file
View File

@ -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

View File

@ -0,0 +1 @@
longrun