Add restarts and stricter sandbox. Add influx
This commit is contained in:
parent
71d3ade3bb
commit
3d24de992d
@ -1,16 +1,23 @@
|
|||||||
|
[Unit]
|
||||||
|
StartLimitIntervalSec=0
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=nobody
|
User=nobody
|
||||||
Group=nogroup
|
Group=nogroup
|
||||||
|
|
||||||
|
Restart=always
|
||||||
|
RestartSec=10
|
||||||
|
|
||||||
Environment=
|
Environment=
|
||||||
Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy/haproxy.pid"
|
Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy/haproxy.pid"
|
||||||
|
|
||||||
ProtectHome=true
|
ProtectHome=true
|
||||||
ProtectSystem=true
|
ProtectSystem=strict
|
||||||
PrivateTmp=yes
|
PrivateTmp=yes
|
||||||
PrivateDevices=yes
|
PrivateDevices=yes
|
||||||
RuntimeDirectory=haproxy
|
RuntimeDirectory=haproxy
|
||||||
|
|
||||||
|
SecureBits=noroot
|
||||||
NoNewPrivileges=true
|
NoNewPrivileges=true
|
||||||
RestrictSUIDSGID=yes
|
RestrictSUIDSGID=yes
|
||||||
MemoryDenyWriteExecute=yes
|
MemoryDenyWriteExecute=yes
|
||||||
|
26
templates/influxdb.service.j2
Normal file
26
templates/influxdb.service.j2
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
[Unit]
|
||||||
|
StartLimitIntervalSec=0
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Restart=always
|
||||||
|
RestartSec=10
|
||||||
|
|
||||||
|
# TODO: Add mounts
|
||||||
|
TemporaryFileSystem=/:ro
|
||||||
|
BindReadOnlyPaths=/etc/influxdb /usr /lib /lib64
|
||||||
|
|
||||||
|
SecureBits=noroot
|
||||||
|
ProtectSystem=strict
|
||||||
|
PrivateUsers=true
|
||||||
|
NoNewPrivileges=yes
|
||||||
|
ProtectControlGroups=yes
|
||||||
|
ProtectKernelModules=yes
|
||||||
|
ProtectKernelTunables=yes
|
||||||
|
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
|
||||||
|
RestrictNamespaces=yes
|
||||||
|
RestrictRealtime=yes
|
||||||
|
RestrictSUIDSGID=yes
|
||||||
|
MemoryDenyWriteExecute=yes
|
||||||
|
LockPersonality=yes
|
||||||
|
PrivateTmp=yes
|
||||||
|
PrivateDevices=yes
|
Reference in New Issue
Block a user