home: imp systemd script

This commit is contained in:
Eugene Burkov 2024-06-11 18:27:31 +03:00
parent bed86d57f3
commit 63731e7ba5
2 changed files with 6 additions and 3 deletions

View File

@ -30,11 +30,15 @@ NOTE: Add new changes BELOW THIS COMMENT.
### Changed ### Changed
- Frontend rewritten in TypeScript. - 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 ### Deprecated
- Node 18 support, Node 20 will be required in future releases. - 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. NOTE: Add new changes ABOVE THIS COMMENT.
--> -->

View File

@ -471,7 +471,6 @@ ConditionFileIsExecutable={{.Path|cmdEscape}}
[Service] [Service]
StartLimitInterval=5 StartLimitInterval=5
StartLimitBurst=10 StartLimitBurst=10
ExecStartPre=/bin/mkdir -p /var/log/
ExecStart={{.Path|cmdEscape}}{{range .Arguments}} {{.|cmd}}{{end}} ExecStart={{.Path|cmdEscape}}{{range .Arguments}} {{.|cmd}}{{end}}
{{if .ChRoot}}RootDirectory={{.ChRoot|cmd}}{{end}} {{if .ChRoot}}RootDirectory={{.ChRoot|cmd}}{{end}}
{{if .WorkingDirectory}}WorkingDirectory={{.WorkingDirectory|cmdEscape}}{{end}} {{if .WorkingDirectory}}WorkingDirectory={{.WorkingDirectory|cmdEscape}}{{end}}
@ -479,8 +478,8 @@ ExecStart={{.Path|cmdEscape}}{{range .Arguments}} {{.|cmd}}{{end}}
{{if .ReloadSignal}}ExecReload=/bin/kill -{{.ReloadSignal}} "$MAINPID"{{end}} {{if .ReloadSignal}}ExecReload=/bin/kill -{{.ReloadSignal}} "$MAINPID"{{end}}
{{if .PIDFile}}PIDFile={{.PIDFile|cmd}}{{end}} {{if .PIDFile}}PIDFile={{.PIDFile|cmd}}{{end}}
{{if and .LogOutput .HasOutputFileSupport -}} {{if and .LogOutput .HasOutputFileSupport -}}
StandardOutput=file:/var/log/{{.Name}}.out StandardOutput=journal
StandardError=file:/var/log/{{.Name}}.err StandardError=journal
{{- end}} {{- end}}
{{if gt .LimitNOFILE -1 }}LimitNOFILE={{.LimitNOFILE}}{{end}} {{if gt .LimitNOFILE -1 }}LimitNOFILE={{.LimitNOFILE}}{{end}}
{{if .Restart}}Restart={{.Restart}}{{end}} {{if .Restart}}Restart={{.Restart}}{{end}}