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/run | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 rc.redis/redis/run (limited to 'rc.redis/redis/run') diff --git a/rc.redis/redis/run b/rc.redis/redis/run new file mode 100644 index 0000000..8c8a426 --- /dev/null +++ b/rc.redis/redis/run @@ -0,0 +1,27 @@ +#!/bin/execlineb -P + +########################################################################### +# Start redis instance supervisor # +# # +# The redis instances are run by the redis user. Database directory is # +# owned by that user and the redis group. You can create these with: # +# # +# groupadd -g 121 redis # +# useradd -u 121 -g 121 -d /var/lib/redis -s /sbin/nologin redis # +# # +# The configuration for redis instances is expected to be named same as # +# port the instance will be running on. For example if redis should # +# listen on 6379, there should be a configuration file in # +# /etc/redis/6379.conf. Generic settings can be put in # +# /etc/redis/redis.conf and included in other configurations. s6 instance # +# name should be the port number as well, 6379 in this case. # +########################################################################### + +fdmove -c 2 1 +foreground { chown redis:redis /var/lib/redis } +s6-envdir env +multisubstitute { + importas -u CMD CMD + importas -usCd" " CMD_OPTS CMD_OPTS +} +emptyenv -p $CMD $CMD_OPTS -- instance -- cgit v1.2.3