Pull request: home: imp openbsd init script

Closes #4533.

Squashed commit of the following:

commit 48ca9e100619e714eab565273daeb4ee9adb5b74
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Apr 28 20:25:15 2022 +0300

    home: imp openbsd init script
This commit is contained in:
Ainar Garipov 2022-04-29 14:39:02 +03:00
parent a580149ad6
commit 21905d9869
3 changed files with 12 additions and 8 deletions

View File

@ -23,8 +23,8 @@ and this project adheres to
### Added
- Support for Discovery of Designated Resolvers (DDR) according to the
[RFC draft][ddr-draft-06] ([#4463]).
- Support for Discovery of Designated Resolvers (DDR) according to the [RFC
draft][ddr-draft-06] ([#4463]).
- The ability to control each source of runtime clients separately via
`clients.runtime_sources` configuration object ([#3020]).
- The ability to customize the set of networks that are considered private
@ -40,6 +40,9 @@ and this project adheres to
### Changed
- On OpenBSD, the daemon script now uses the recommended `/bin/ksh` shell
instead of the `/bin/sh` one ([#4533]). To apply this change, backup your
data and run `AdGuardHome -s uninstall && AdGuardHome -s install`.
- The default DNS-over-QUIC port number is now `853` instead of `754` in
accordance with the latest [RFC draft][doq-draft-10] ([#4276]).
- Reverse DNS now has a greater priority as the source of runtime clients'
@ -144,6 +147,7 @@ In this release, the schema version has changed from 12 to 14.
[#4238]: https://github.com/AdguardTeam/AdGuardHome/issues/4238
[#4276]: https://github.com/AdguardTeam/AdGuardHome/issues/4276
[#4499]: https://github.com/AdguardTeam/AdGuardHome/issues/4499
[#4533]: https://github.com/AdguardTeam/AdGuardHome/issues/4533
[ddr-draft-06]: https://www.ietf.org/archive/id/draft-ietf-add-ddr-06.html
[doq-draft-10]: https://datatracker.ietf.org/doc/html/draft-ietf-dprive-dnsoquic-10#section-10.2

View File

@ -609,7 +609,7 @@ command_args="-P ${pidfile} -p ${pidfile_child} -T ${name} -r {{.WorkingDirector
run_rc_command "$1"
`
const openBSDScript = `#!/bin/sh
const openBSDScript = `#!/bin/ksh
#
# $OpenBSD: {{ .SvcInfo }}

View File

@ -19,10 +19,10 @@ type signalHandler struct {
// handle processes OS signals.
func (h *signalHandler) handle() {
defer log.OnPanic("signalProcessor.handle")
defer log.OnPanic("signalHandler.handle")
for sig := range h.signal {
log.Info("sigproc: received signal %q", sig)
log.Info("sighdlr: received signal %q", sig)
if aghos.IsShutdownSignal(sig) {
h.shutdown()
@ -43,16 +43,16 @@ func (h *signalHandler) shutdown() {
status := statusSuccess
log.Info("sigproc: shutting down services")
log.Info("sighdlr: shutting down services")
for i, service := range h.services {
err := service.Shutdown(ctx)
if err != nil {
log.Error("sigproc: shutting down service at index %d: %s", i, err)
log.Error("sighdlr: shutting down service at index %d: %s", i, err)
status = statusError
}
}
log.Info("sigproc: shutting down adguard home")
log.Info("sighdlr: shutting down adguard home")
os.Exit(status)
}