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:
ginuerzh
2026-09-21 21:15:33 +08:00
parent c4e789e2df
commit bb45b12809
+1 -1
View File
@@ -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