summaryrefslogtreecommitdiff
path: root/rc.redis/redis/run
diff options
context:
space:
mode:
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