summaryrefslogtreecommitdiff
path: root/utils/templates/lib/systemd/system/searxng-redis.service
blob: d1d163f040437a1091665d7e432a6ec93d2d6fd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
[Unit]

Description=SearXNG redis service
After=syslog.target
After=network.target
Documentation=https://redis.io/documentation

[Service]

Type=simple
User=${REDIS_USER}
Group=${REDIS_USER}
WorkingDirectory=${REDIS_HOME}
Restart=always
TimeoutStopSec=0

Environment=USER=${REDIS_USER} HOME=${REDIS_HOME}
ExecStart=${REDIS_HOME_BIN}/redis-server ${REDIS_CONF}
ExecPaths=${REDIS_HOME_BIN}

LimitNOFILE=65535
NoNewPrivileges=true
PrivateDevices=yes

# ProtectSystem=full
ProtectHome=yes
ReadOnlyDirectories=/
ReadWritePaths=-${REDIS_HOME}/run

UMask=007
PrivateTmp=yes

MemoryDenyWriteExecute=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectControlGroups=true
RestrictRealtime=true
RestrictNamespaces=true

[Install]

WantedBy=multi-user.target