mirror of
https://github.com/go-gost/gost.git
synced 2026-10-08 03:55:45 +00:00
fix(release): use DynamicUser for gost.service
systemd-analyze verify warns "Special user nobody configured, this is not safe!": nobody is a shared account, so any other service running as it can read and write /run/gost. DynamicUser= gives the unit its own transient identity, named gost, without adding a static user to the package. Verified under a real systemd: the unit starts, binds :80 through the ambient capabilities, runs as the dynamic user, and is skipped rather than failed when /etc/gost/gost.yml is absent.
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ WorkingDirectory=/run/gost
|
||||
ExecStart=/usr/bin/gost -C /etc/gost/gost.yml
|
||||
ExecReload=/bin/kill -SIGHUP $MAINPID
|
||||
|
||||
User=nobody
|
||||
DynamicUser=yes
|
||||
RuntimeDirectory=gost
|
||||
LogsDirectory=gost
|
||||
TimeoutStopSec=5s
|
||||
|
||||
Reference in New Issue
Block a user