From 21905d98693a58a24560ceac5461a470beb70af8 Mon Sep 17 00:00:00 2001 From: Ainar Garipov Date: Fri, 29 Apr 2022 14:39:02 +0300 Subject: [PATCH] Pull request: home: imp openbsd init script Closes #4533. Squashed commit of the following: commit 48ca9e100619e714eab565273daeb4ee9adb5b74 Author: Ainar Garipov Date: Thu Apr 28 20:25:15 2022 +0300 home: imp openbsd init script --- CHANGELOG.md | 8 ++++++-- internal/home/service.go | 2 +- internal/v1/cmd/signal.go | 10 +++++----- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84f45312..289b1d2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/internal/home/service.go b/internal/home/service.go index 081974e2..70ab3c78 100644 --- a/internal/home/service.go +++ b/internal/home/service.go @@ -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 }} diff --git a/internal/v1/cmd/signal.go b/internal/v1/cmd/signal.go index b9f09673..b66075f6 100644 --- a/internal/v1/cmd/signal.go +++ b/internal/v1/cmd/signal.go @@ -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) }