From: Chris Lamb <lamby@debian.org>
Date: Tue, 10 Oct 2017 09:56:42 +0100
Subject: Set Debian configuration defaults.

Forwarded: not-needed
---
 redis.conf    | 15 +++++++++------
 sentinel.conf |  9 +++++----
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/redis.conf b/redis.conf
index 97f8180..d341032 100644
--- a/redis.conf
+++ b/redis.conf
@@ -65,7 +65,7 @@
 # IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES
 # JUST COMMENT OUT THE FOLLOWING LINE.
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-bind 127.0.0.1
+bind 127.0.0.1 ::1
 
 # Protected mode is a layer of security protection, in order to avoid that
 # Redis instances left open on the internet are accessed and exploited.
@@ -105,7 +105,7 @@ tcp-backlog 511
 # incoming connections. There is no default, so Redis will not listen
 # on a unix socket when not specified.
 #
-# unixsocket /tmp/redis.sock
+# unixsocket /var/run/redis/redis-server.sock
 # unixsocketperm 700
 
 # Close the connection after a client is idle for N seconds (0 to disable)
@@ -221,7 +221,7 @@ tcp-keepalive 300
 
 # By default Redis does not run as a daemon. Use 'yes' if you need it.
 # Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
-daemonize no
+daemonize yes
 
 # If you run Redis from upstart or systemd, Redis can interact with your
 # supervision tree. Options:
@@ -244,7 +244,7 @@ supervised no
 #
 # Creating a pid file is best effort: if Redis is not able to create it
 # nothing bad happens, the server will start and run normally.
-pidfile /var/run/redis_6379.pid
+pidfile /var/run/redis/redis-server.pid
 
 # Specify the server verbosity level.
 # This can be one of:
@@ -257,7 +257,7 @@ loglevel notice
 # Specify the log file name. Also the empty string can be used to force
 # Redis to log on the standard output. Note that if you use standard
 # output for logging but daemonize, logs will be sent to /dev/null
-logfile ""
+logfile /var/log/redis/redis-server.log
 
 # To enable logging to the system logger, just set 'syslog-enabled' to yes,
 # and optionally update the other syslog parameters to suit your needs.
@@ -362,7 +362,7 @@ rdb-del-sync-files no
 # The Append Only File will also be created inside this directory.
 #
 # Note that you must specify a directory here, not a file name.
-dir ./
+dir /var/lib/redis
 
 ################################# REPLICATION #################################
 
@@ -1818,6 +1818,9 @@ rdb-save-incremental-fsync yes
 # a good idea to leave the defaults untouched.
 
 # Enabled active defragmentation
+# NOTE: This feature is not available in the stock Debian packages as they use
+# the distribution-wide jemalloc allocator that does not have support for active
+# defragmentation. See #967970 for more information.
 # activedefrag no
 
 # Minimum amount of fragmentation waste to start active defrag
diff --git a/sentinel.conf b/sentinel.conf
index b6ff05f..a6bccff 100644
--- a/sentinel.conf
+++ b/sentinel.conf
@@ -13,6 +13,7 @@
 # For example you may use one of the following:
 #
 # bind 127.0.0.1 192.168.1.1
+bind 127.0.0.1 ::1
 #
 # protected-mode no
 
@@ -23,17 +24,17 @@ port 26379
 # By default Redis Sentinel does not run as a daemon. Use 'yes' if you need it.
 # Note that Redis will write a pid file in /var/run/redis-sentinel.pid when
 # daemonized.
-daemonize no
+daemonize yes
 
 # When running daemonized, Redis Sentinel writes a pid file in
 # /var/run/redis-sentinel.pid by default. You can specify a custom pid file
 # location here.
-pidfile /var/run/redis-sentinel.pid
+pidfile /var/run/sentinel/redis-sentinel.pid
 
 # Specify the log file name. Also the empty string can be used to force
 # Sentinel to log on the standard output. Note that if you use standard
 # output for logging but daemonize, logs will be sent to /dev/null
-logfile ""
+logfile /var/log/redis/redis-sentinel.log
 
 # sentinel announce-ip <ip>
 # sentinel announce-port <port>
@@ -62,7 +63,7 @@ logfile ""
 # For Redis Sentinel to chdir to /tmp at startup is the simplest thing
 # for the process to don't interfere with administrative tasks such as
 # unmounting filesystems.
-dir /tmp
+dir /var/lib/redis
 
 # sentinel monitor <master-name> <ip> <redis-port> <quorum>
 #
