Skip to content

Commit

Permalink
home: imp systemd script
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneOne1 committed Jun 11, 2024
1 parent bed86d5 commit 63731e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ NOTE: Add new changes BELOW THIS COMMENT.
### Changed

- Frontend rewritten in TypeScript.
- The `systemd`-based service now uses `journal` for logging by default. It
also doesn't create the `/var/log/` directory anymore ([#7053]).

### Deprecated

- Node 18 support, Node 20 will be required in future releases.

[#7053]: https://github.com/AdguardTeam/AdGuardHome/issues/7053

<!--
NOTE: Add new changes ABOVE THIS COMMENT.
-->
Expand Down
5 changes: 2 additions & 3 deletions internal/home/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,16 +471,15 @@ ConditionFileIsExecutable={{.Path|cmdEscape}}
[Service]
StartLimitInterval=5
StartLimitBurst=10
ExecStartPre=/bin/mkdir -p /var/log/
ExecStart={{.Path|cmdEscape}}{{range .Arguments}} {{.|cmd}}{{end}}
{{if .ChRoot}}RootDirectory={{.ChRoot|cmd}}{{end}}
{{if .WorkingDirectory}}WorkingDirectory={{.WorkingDirectory|cmdEscape}}{{end}}
{{if .UserName}}User={{.UserName}}{{end}}
{{if .ReloadSignal}}ExecReload=/bin/kill -{{.ReloadSignal}} "$MAINPID"{{end}}
{{if .PIDFile}}PIDFile={{.PIDFile|cmd}}{{end}}
{{if and .LogOutput .HasOutputFileSupport -}}
StandardOutput=file:/var/log/{{.Name}}.out
StandardError=file:/var/log/{{.Name}}.err
StandardOutput=journal
StandardError=journal
{{- end}}
{{if gt .LimitNOFILE -1 }}LimitNOFILE={{.LimitNOFILE}}{{end}}
{{if .Restart}}Restart={{.Restart}}{{end}}
Expand Down

0 comments on commit 63731e7

Please sign in to comment.