-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (34 loc) · 908 Bytes
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
[Unit]
Description=oauth2-proxy %I daemon service
After=network.target
Documentation=https://github.com/oauth2-proxy/oauth2-proxy
After=syslog.target network.target
StartLimitBurst=5
StartLimitIntervalSec=30
[Service]
User=oauth2proxy
Group=oauth2proxy
KillMode=process
Restart=always
ExecStart=/usr/local/bin/oauth2-proxy --config=/etc/oauth2proxy/oauth2proxy_%i.cfg
ExecReload=/usr/bin/kill -HUP $MAINPID
RuntimeDirectory=oauth2proxy_%i
RuntimeDirectoryMode=2755
UMask=007
LimitNOFILE=65535
ReadOnlyDirectories=/
ProtectSystem=full
PrivateTmp=yes
PrivateDevices=yes
ProtectHome=yes
NoNewPrivileges=true
MemoryDenyWriteExecute=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectControlGroups=true
RestrictRealtime=true
RestrictNamespaces=true
CapabilityBoundingSet=CAP_SETGID CAP_SETUID CAP_SYS_RESOURCE
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
[Install]
WantedBy=multi-user.target