mirror of
https://github.com/fankes/beszel.git
synced 2025-10-20 02:09:28 +08:00
agent-install: add security options to systemd unit file
This commit is contained in:
@@ -470,8 +470,24 @@ Environment="KEY=$KEY"
|
|||||||
# Environment="EXTRA_FILESYSTEMS=sdb"
|
# Environment="EXTRA_FILESYSTEMS=sdb"
|
||||||
ExecStart=/opt/beszel-agent/beszel-agent
|
ExecStart=/opt/beszel-agent/beszel-agent
|
||||||
User=beszel
|
User=beszel
|
||||||
Restart=always
|
Restart=on-failure
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
|
StateDirectory=beszel-agent
|
||||||
|
|
||||||
|
# Security/sandboxing settings
|
||||||
|
KeyringMode=private
|
||||||
|
LockPersonality=yes
|
||||||
|
NoNewPrivileges=yes
|
||||||
|
PrivateTmp=yes
|
||||||
|
ProtectClock=yes
|
||||||
|
ProtectHome=read-only
|
||||||
|
ProtectHostname=yes
|
||||||
|
ProtectKernelLogs=yes
|
||||||
|
ProtectKernelTunables=yes
|
||||||
|
ProtectSystem=strict
|
||||||
|
RemoveIPC=yes
|
||||||
|
RestrictSUIDSGID=true
|
||||||
|
SystemCallArchitectures=native
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
Reference in New Issue
Block a user