File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,6 @@ Documentation=http://redis.io/documentation
55
66[Service]
77Type =notify
8- # Try to restore context for sentinel.conf* as sentinel needs to write into these files
9- ExecStartPre =-/bin/sh -c "[ -x /sbin/restorecon ] && /sbin/restorecon '/etc/redis/sentinel.conf*'"
108ExecStart =/usr/bin/redis-sentinel /etc/redis/sentinel.conf
119TimeoutStopSec =0
1210Restart =always
@@ -24,8 +22,6 @@ ReadOnlyDirectories=/
2422ReadWriteDirectories =-/var/lib/redis
2523ReadWriteDirectories =-/var/log/redis
2624ReadWriteDirectories =-/run/sentinel
27- # To run restorecon in ExecStartPre
28- PermissionsStartOnly =yes
2925
3026NoNewPrivileges =true
3127CapabilityBoundingSet =CAP_SYS_RESOURCE
Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ if command -v checkmodule &> /dev/null && command -v semodule_package &> /dev/nu
1010 semodule -i /usr/share/selinux/packages/redis-ce.pp
1111fi
1212
13- # Allow writing to /etc/redis/sentinel.conf* for redis-sentinel
13+ # Allow writing to /etc/redis/sentinel/ for redis-sentinel
1414if command -v semanage & > /dev/null; then
15- semanage fcontext -a -t redis_conf_t ' /etc/redis/sentinel.conf* '
16- restorecon ' /etc/redis/sentinel.conf* '
15+ semanage fcontext -a -t redis_conf_t ' /etc/redis/sentinel'
16+ restorecon ' /etc/redis/sentinel'
1717fi
1818
1919#
Original file line number Diff line number Diff line change @@ -88,6 +88,12 @@ contents:
8888 mode: 0750
8989 owner: redis
9090 group: redis
91+ - dst: /etc/redis/sentinel
92+ type: dir
93+ file_info:
94+ mode: 0750
95+ owner: redis
96+ group: redis
9197 - src: ./configs/redis.conf
9298 dst: /etc/redis/redis.conf
9399 type: config|noreplace
@@ -96,7 +102,7 @@ contents:
96102 owner: redis
97103 group: redis
98104 - src: ./configs/sentinel.conf
99- dst: /etc/redis/sentinel.conf
105+ dst: /etc/redis/sentinel/sentinel .conf
100106 type: config|noreplace
101107 file_info:
102108 mode: 0640
You can’t perform that action at this time.
0 commit comments