This commit is contained in:
mwiegand 2021-10-20 23:50:12 +02:00
parent ea494b10e3
commit d1bbfecbc9

View file

@ -40,15 +40,15 @@ def config(metadata):
'protected-mode': 'yes', 'protected-mode': 'yes',
'port': '6379', 'port': '6379',
'tcp-backlog': '511', 'tcp-backlog': '511',
'unixsocket': f'/var/run/redis/redis-{name}.sock', 'unixsocket': f'/var/run/redis-{name}/redis.sock',
'unixsocketperm': '700', 'unixsocketperm': '700',
'timeout': '0', 'timeout': '0',
'tcp-keepalive': '300', 'tcp-keepalive': '300',
'daemonize': 'yes', 'daemonize': 'yes',
'supervised': 'no', 'supervised': 'no',
'pidfile': f'/var/run/redis/redis-{name}.pid', 'pidfile': f'/var/run/redis-{name}/redis.pid',
'loglevel': 'notice', 'loglevel': 'notice',
'logfile': f'/var/log/redis/redis-{name}.log', 'logfile': f'/var/log/redis/{name}.log',
'databases': '16', 'databases': '16',
'always-show-logo': 'yes', 'always-show-logo': 'yes',
'save': '900 1', 'save': '900 1',
@ -122,12 +122,12 @@ def units(metadata):
'Service': { 'Service': {
'Type': 'notify', 'Type': 'notify',
'ExecStart': f'/usr/bin/redis-server /etc/redis/{name}.conf --supervised systemd --daemonize no', 'ExecStart': f'/usr/bin/redis-server /etc/redis/{name}.conf --supervised systemd --daemonize no',
'PIDFile': f'/run/redis/redis-{name}.pid', 'PIDFile': f'/run/redis-{name}/redis.pid',
'TimeoutStopSec': '0', 'TimeoutStopSec': '0',
'Restart': 'always', 'Restart': 'always',
'User': 'redis', 'User': 'redis',
'Group': 'redis', 'Group': 'redis',
'RuntimeDirectory': f'redis', 'RuntimeDirectory': f'redis-{name}',
'RuntimeDirectoryMode': '2755', 'RuntimeDirectoryMode': '2755',
'UMask': '007', 'UMask': '007',
@ -139,7 +139,7 @@ def units(metadata):
'ReadWritePaths': [ 'ReadWritePaths': [
'-/var/lib/redis', '-/var/lib/redis',
'-/var/log/redis', '-/var/log/redis',
'-/var/run/redis', f'-/var/run/redis-{name}',
], ],
'NoNewPrivileges': 'true', 'NoNewPrivileges': 'true',