summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db/redis/files')
-rw-r--r--dev-db/redis/files/redis-sentinel-4.0.6-config.patch9
-rw-r--r--dev-db/redis/files/redis-sentinel.confd16
-rw-r--r--dev-db/redis/files/redis-sentinel.initd22
-rw-r--r--dev-db/redis/files/redis.logrotate6
4 files changed, 53 insertions, 0 deletions
diff --git a/dev-db/redis/files/redis-sentinel-4.0.6-config.patch b/dev-db/redis/files/redis-sentinel-4.0.6-config.patch
new file mode 100644
index 000000000000..f2a75814951c
--- /dev/null
+++ b/dev-db/redis/files/redis-sentinel-4.0.6-config.patch
@@ -0,0 +1,9 @@
+diff --git a/sentinel.conf b/sentinel.conf
+index 0e1b266..869a4b9 100644
+--- a/sentinel.conf
++++ b/sentinel.conf
+@@ -194,3 +194,4 @@ sentinel failover-timeout mymaster 180000
+ #
+ # sentinel client-reconfig-script mymaster /var/redis/reconfig.sh
+
++logfile "/var/log/redis/sentinel.log"
diff --git a/dev-db/redis/files/redis-sentinel.confd b/dev-db/redis/files/redis-sentinel.confd
new file mode 100644
index 000000000000..f465a5c3e91f
--- /dev/null
+++ b/dev-db/redis/files/redis-sentinel.confd
@@ -0,0 +1,16 @@
+# Redis-sentinel user.
+REDIS_SENTINEL_USER="redis"
+
+# Redis-sentinel group.
+REDIS_SENTINEL_GROUP="redis"
+
+# Redis-sentinel configuration file.
+REDIS_SENTINEL_CONF="/etc/sentinel.conf"
+
+# Redis-sentinel working directory.
+REDIS_SENTINEL_DIR="/tmp"
+
+# Specify the network service that corresponds to the "bind" setting
+# in your sentinel.conf. For example, if you bind to 127.0.0.1, this should
+# be set to "net.lo" which provides the loopback interface.
+rc_need="net.lo"
diff --git a/dev-db/redis/files/redis-sentinel.initd b/dev-db/redis/files/redis-sentinel.initd
new file mode 100644
index 000000000000..6a22d08db697
--- /dev/null
+++ b/dev-db/redis/files/redis-sentinel.initd
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+: ${REDIS_SENTINEL_DIR:=/tmp}
+: ${REDIS_SENTINEL_CONF:=/etc/sentinel.conf}
+: ${REDIS_SENTINEL_USER:=redis}
+: ${REDIS_SENTINEL_GROUP:=redis}
+: ${REDIS_SENTINEL_TIMEOUT:=30}
+
+command="/usr/sbin/redis-sentinel"
+command_args="${REDIS_SENTINEL_CONF}"
+command_background="true"
+command_user="${REDIS_SENTINEL_USER}:${REDIS_SENTINEL_GROUP}"
+pidfile="/run/${RC_SVCNAME}.pid"
+retry="${REDIS_SENTINEL_TIMEOUT}"
+start_stop_daemon_args="--chdir \"${REDIS_SENTINEL_DIR}\""
+
+depend() {
+ use localmount logger
+ after keepalived redis
+}
diff --git a/dev-db/redis/files/redis.logrotate b/dev-db/redis/files/redis.logrotate
new file mode 100644
index 000000000000..2df390c2d1b4
--- /dev/null
+++ b/dev-db/redis/files/redis.logrotate
@@ -0,0 +1,6 @@
+/var/log/redis/redis.log /var/log/redis/sentinel.log {
+ compress
+ delaycompress
+ notifempty
+ missingok
+}