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:
parent
a580149ad6
commit
21905d9869
|
@ -23,8 +23,8 @@ and this project adheres to
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Support for Discovery of Designated Resolvers (DDR) according to the
|
- Support for Discovery of Designated Resolvers (DDR) according to the [RFC
|
||||||
[RFC draft][ddr-draft-06] ([#4463]).
|
draft][ddr-draft-06] ([#4463]).
|
||||||
- The ability to control each source of runtime clients separately via
|
- The ability to control each source of runtime clients separately via
|
||||||
`clients.runtime_sources` configuration object ([#3020]).
|
`clients.runtime_sources` configuration object ([#3020]).
|
||||||
- The ability to customize the set of networks that are considered private
|
- The ability to customize the set of networks that are considered private
|
||||||
|
@ -40,6 +40,9 @@ and this project adheres to
|
||||||
|
|
||||||
### Changed
|
### 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
|
- The default DNS-over-QUIC port number is now `853` instead of `754` in
|
||||||
accordance with the latest [RFC draft][doq-draft-10] ([#4276]).
|
accordance with the latest [RFC draft][doq-draft-10] ([#4276]).
|
||||||
- Reverse DNS now has a greater priority as the source of runtime clients'
|
- 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
|
[#4238]: https://github.com/AdguardTeam/AdGuardHome/issues/4238
|
||||||
[#4276]: https://github.com/AdguardTeam/AdGuardHome/issues/4276
|
[#4276]: https://github.com/AdguardTeam/AdGuardHome/issues/4276
|
||||||
[#4499]: https://github.com/AdguardTeam/AdGuardHome/issues/4499
|
[#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
|
[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
|
[doq-draft-10]: https://datatracker.ietf.org/doc/html/draft-ietf-dprive-dnsoquic-10#section-10.2
|
||||||
|
|
|
@ -609,7 +609,7 @@ command_args="-P ${pidfile} -p ${pidfile_child} -T ${name} -r {{.WorkingDirector
|
||||||
run_rc_command "$1"
|
run_rc_command "$1"
|
||||||
`
|
`
|
||||||
|
|
||||||
const openBSDScript = `#!/bin/sh
|
const openBSDScript = `#!/bin/ksh
|
||||||
#
|
#
|
||||||
# $OpenBSD: {{ .SvcInfo }}
|
# $OpenBSD: {{ .SvcInfo }}
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,10 @@ type signalHandler struct {
|
||||||
|
|
||||||
// handle processes OS signals.
|
// handle processes OS signals.
|
||||||
func (h *signalHandler) handle() {
|
func (h *signalHandler) handle() {
|
||||||
defer log.OnPanic("signalProcessor.handle")
|
defer log.OnPanic("signalHandler.handle")
|
||||||
|
|
||||||
for sig := range h.signal {
|
for sig := range h.signal {
|
||||||
log.Info("sigproc: received signal %q", sig)
|
log.Info("sighdlr: received signal %q", sig)
|
||||||
|
|
||||||
if aghos.IsShutdownSignal(sig) {
|
if aghos.IsShutdownSignal(sig) {
|
||||||
h.shutdown()
|
h.shutdown()
|
||||||
|
@ -43,16 +43,16 @@ func (h *signalHandler) shutdown() {
|
||||||
|
|
||||||
status := statusSuccess
|
status := statusSuccess
|
||||||
|
|
||||||
log.Info("sigproc: shutting down services")
|
log.Info("sighdlr: shutting down services")
|
||||||
for i, service := range h.services {
|
for i, service := range h.services {
|
||||||
err := service.Shutdown(ctx)
|
err := service.Shutdown(ctx)
|
||||||
if err != nil {
|
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
|
status = statusError
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Info("sigproc: shutting down adguard home")
|
log.Info("sighdlr: shutting down adguard home")
|
||||||
|
|
||||||
os.Exit(status)
|
os.Exit(status)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue