Skip to content

Commit d6f1eb9

Browse files
committed
Added missing redis-sentinel.service config
1 parent 397895b commit d6f1eb9

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

configs/redis-sentinel.service

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[Unit]
2+
Description=Advanced key-value store
3+
After=network.target
4+
Documentation=http://redis.io/documentation
5+
6+
[Service]
7+
Type=notify
8+
ExecStart=/usr/bin/redis-sentinel /etc/redis/sentinel.conf
9+
TimeoutStopSec=0
10+
Restart=always
11+
User=redis
12+
Group=redis
13+
RuntimeDirectory=sentinel
14+
RuntimeDirectoryMode=2755
15+
16+
UMask=007
17+
PrivateTmp=yes
18+
LimitNOFILE=65535
19+
PrivateDevices=yes
20+
ProtectHome=yes
21+
ReadOnlyDirectories=/
22+
ReadWriteDirectories=-/var/lib/redis
23+
ReadWriteDirectories=-/var/log/redis
24+
ReadWriteDirectories=-/run/sentinel
25+
26+
NoNewPrivileges=true
27+
CapabilityBoundingSet=CAP_SYS_RESOURCE
28+
ProtectSystem=true
29+
ReadWriteDirectories=-/etc/redis
30+
31+
[Install]
32+
WantedBy=multi-user.target
33+
Alias=sentinel.service

templates/nfpm.yaml.tpl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ contents:
109109
owner: root
110110
group: root
111111

112-
# Systemd service file
112+
# Systemd service file for redis-server
113113
- src: ./configs/redis.service
114114
dst: /usr/lib/systemd/system/redis.service
115115
type: config
@@ -118,6 +118,15 @@ contents:
118118
owner: root
119119
group: root
120120

121+
# Systemd service file for redis-sentinel
122+
- src: ./configs/redis-sentinel.service
123+
dst: /usr/lib/systemd/system/redis-sentinel.service
124+
type: config
125+
file_info:
126+
mode: 0644
127+
owner: root
128+
group: root
129+
121130
# Log files
122131
- dst: /var/log/redis/redis-sentinel.log
123132
type: ghost

0 commit comments

Comments
 (0)