[Unit]
Description=Redis In-Memory Data Store
After=network.target
[Service]
User=redis
Group=redis
ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf
ExecStop=/usr/local/bin/redis-cli shutdown
Restart=always
# Adjust these if redis logs to a file
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=redis-server
[Install]
WantedBy=multi-user.target
[Unit]
Description=Redis Sentinel
After=network.target
[Service]
User=redis
Group=redis
ExecStart=/usr/local/bin/redis-sentinel /etc/redis/sentinel.conf --daemonize no
ExecStop=/usr/local/bin/redis-cli -p 26379 shutdown
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=redis-sentinel
[Install]
WantedBy=multi-user.target