flag for config location, adjusted .service
This commit is contained in:
parent
751e7213c9
commit
eb9fcbee03
|
@ -6,12 +6,15 @@ After=network.target
|
|||
DynamicUser=yes
|
||||
ExecStart=/opt/csgowtfd/csgowtfd
|
||||
WorkingDirectory=/var/lib/csgowtfd
|
||||
RuntimeDirectory=csgowtfd
|
||||
StateDirectory=csgowtfd
|
||||
ConfigurationDirectory=csgowtfd
|
||||
|
||||
# more hardening
|
||||
NoNewPrivileges=yes
|
||||
PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
DevicePolicy=closed
|
||||
ProtectSystem=strict
|
||||
ProtectHome=read-only
|
||||
ProtectControlGroups=yes
|
||||
ProtectKernelModules=yes
|
||||
ProtectKernelTunables=yes
|
||||
|
@ -23,4 +26,4 @@ MemoryDenyWriteExecute=yes
|
|||
LockPersonality=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=multi-user.target
|
3
main.go
3
main.go
|
@ -36,6 +36,7 @@ var (
|
|||
demoParser = &csgo.DemoParser{}
|
||||
firstHK = true
|
||||
rL ratelimit.Limiter
|
||||
configFlag = flag.String("config", "config.yaml", "Set config to use")
|
||||
)
|
||||
|
||||
type PlayerResponse struct {
|
||||
|
@ -360,7 +361,7 @@ func main() {
|
|||
|
||||
flag.Parse()
|
||||
|
||||
confStr, err := os.ReadFile("config.yaml")
|
||||
confStr, err := os.ReadFile(*configFlag)
|
||||
utils.Check(err)
|
||||
|
||||
err = yaml.Unmarshal(confStr, &conf)
|
||||
|
|
Loading…
Reference in New Issue