[Unit] Description=Advanced key-value store After=network.target Documentation=http://redis.io/documentation, man:redis-sentinel(1) [Service] Type=notify ExecStart=/usr/bin/redis-sentinel /etc/redis/sentinel.conf ExecStop=/bin/kill -s TERM $MAINPID PIDFile=/run/sentinel/redis-sentinel.pid TimeoutStopSec=0 Restart=always User=redis Group=redis RuntimeDirectory=sentinel RuntimeDirectoryMode=2755 UMask=007 PrivateTmp=yes LimitNOFILE=65535 PrivateDevices=yes ProtectHome=yes ReadOnlyDirectories=/ ReadWriteDirectories=-/var/lib/redis ReadWriteDirectories=-/var/log/redis ReadWriteDirectories=-/run/sentinel NoNewPrivileges=true CapabilityBoundingSet=CAP_SETGID CAP_SETUID CAP_SYS_RESOURCE RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX MemoryDenyWriteExecute=true ProtectKernelModules=true ProtectKernelTunables=true ProtectControlGroups=true RestrictRealtime=true RestrictNamespaces=true # redis-sentinel can write to its own config file when in cluster mode so we # permit writing there by default. If you are not using this feature, it is # recommended that you replace the following lines with "ProtectSystem=full". ProtectSystem=true ReadWriteDirectories=-/etc/redis [Install] WantedBy=multi-user.target Alias=sentinel.service