projects/aports·blob master · refs

106 lines · 3.8 KiB

1We force "daemonize no" in init script, so daemonize and pidfile does not
2have any effect in keydb.conf. It's init/rc system's job to daemonize
3programs and handle pidfiles, if it needs it!
4
5Applications often communicate with Redis via unix socket, so it's
6convenient to have it enabled by default. It must be in a subdirectory that
7is automatically created by the init script because keydb user has no
8permission to create files in /run.
9
10--- a/keydb.conf
11+++ b/keydb.conf
12@@ -123,8 +123,8 @@
13 # incoming connections. There is no default, so KeyDB will not listen
14 # on a unix socket when not specified.
15 #
16-# unixsocket /tmp/keydb.sock
17-# unixsocketperm 700
18+unixsocket /run/keydb/keydb.sock
19+unixsocketperm 770
20
21 # Close the connection after a client is idle for N seconds (0 to disable)
22 timeout 0
23@@ -279,10 +279,6 @@
24
25 ################################# GENERAL #####################################
26
27-# By default KeyDB does not run as a daemon. Use 'yes' if you need it.
28-# Note that KeyDB will write a pid file in /var/run/keydb.pid when daemonized.
29-daemonize no
30-
31 # If you run KeyDB from upstart or systemd, KeyDB can interact with your
32 # supervision tree. Options:
33 # supervised no - no supervision interaction
34@@ -295,17 +291,6 @@
35 # They do not enable continuous pings back to your supervisor.
36 supervised no
37
38-# If a pid file is specified, KeyDB writes it where specified at startup
39-# and removes it at exit.
40-#
41-# When the server runs non daemonized, no pid file is created if none is
42-# specified in the configuration. When the server is daemonized, the pid file
43-# is used even if not specified, defaulting to "/var/run/keydb.pid".
44-#
45-# Creating a pid file is best effort: if KeyDB is not able to create it
46-# nothing bad happens, the server will start and run normally.
47-pidfile /var/run/keydb_6379.pid
48-
49 # Specify the server verbosity level.
50 # This can be one of:
51 # debug (a lot of information, useful for development/testing)
52@@ -317,14 +302,14 @@
53 # Specify the log file name. Also the empty string can be used to force
54 # KeyDB to log on the standard output. Note that if you use standard
55 # output for logging but daemonize, logs will be sent to /dev/null
56-logfile ""
57+# logfile "/var/log/keydb.log"
58
59 # To enable logging to the system logger, just set 'syslog-enabled' to yes,
60 # and optionally update the other syslog parameters to suit your needs.
61-# syslog-enabled no
62+syslog-enabled yes
63
64 # Specify the syslog identity.
65-# syslog-ident keydb
66+syslog-ident keydb
67
68 # Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7.
69 # syslog-facility local0
70@@ -350,16 +335,13 @@
71 #
72 # However it is possible to force the pre-4.0 behavior and always show a
73 # ASCII art logo in startup logs by setting the following option to yes.
74-always-show-logo yes
75+# always-show-logo yes
76
77 # By default, KeyDB modifies the process title (as seen in 'top' and 'ps') to
78 # provide some runtime information. It is possible to disable this and leave
79 # the process name as executed by setting the following to no.
80 set-proc-title yes
81
82-# Retrieving "message of today" using CURL requests.
83-#enable-motd yes
84-
85 # When changing the process title, KeyDB uses the following template to construct
86 # the modified title.
87 #
88@@ -470,7 +452,7 @@
89 # The Append Only File will also be created inside this directory.
90 #
91 # Note that you must specify a directory here, not a file name.
92-dir ./
93+dir /var/lib/keydb
94
95 ################################# REPLICATION #################################
96
97@@ -2105,4 +2087,7 @@
98 # this is only exposed via the info command for clients to use, but in the future we
99 # we may also use this when making decisions for replication.
100 #
101-# availability-zone "us-east-1a"
102\ No newline at end of file
103+# availability-zone "us-east-1a"
104+
105+# Include configuration fragments.
106+include /etc/keydb/keydb.d/*.conf