aboutsummaryrefslogtreecommitdiff
path: root/rc.redis/redis/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/run
parent22994bb8694b8aa8b1094f1e7f24f499816fa1a4 (diff)
downloads6-21efcfc5ef3466e4bbdb5758e9f21af14337e583.tar.gz
Add templated redis
Diffstat (limited to 'rc.redis/redis/run')
-rw-r--r--rc.redis/redis/run27
1 files changed, 27 insertions, 0 deletions
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