blob: 3185197411880e559cdc2604c40edf4014488801 (
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
|
[Unit]
Description=Web based code review and project management for Git-based projects
After=network.target
[Service]
User=gerrit
EnvironmentFile=/etc/default/gerritcodereview
ExecStart=@/usr/bin/java gerrit -DGerritCodeReview=1 $JAVA_OPTIONS -jar /usr/share/java/gerrit/gerrit.war daemon -d /var/lib/gerrit --console-log --init
OOMScoreAdjust=-1000
# /var/lib/gerrit (auto mkdir & chown -R)
StateDirectory=gerrit
# limits
LimitCPU=infinity
LimitFSIZE=infinity
LimitDATA=infinity
LimitCORE=0
LimitAS=infinity
LimitLOCKS=infinity
# isolation
PrivateMounts=yes
PrivateTmp=yes
ProtectClock=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectHostname=yes
ProtectKernelLogs=yes
ProtectKernelModules=no
ProtectKernelTunables=no
ProtectSystem=strict
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
[Install]
WantedBy=multi-user.target
# vim: ft=systemd
|