diff --git a/CHANGELOG.md b/CHANGELOG.md index ed949cc3..6ac34558 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,8 +30,13 @@ and this project adheres to - Go 1.17 support. v0.109.0 will require at least Go 1.18 to build. +### Fixed + +- Broken service installation on OpenWrt ([#4677]). + [#2993]: https://github.com/AdguardTeam/AdGuardHome/issues/2993 [#3057]: https://github.com/AdguardTeam/AdGuardHome/issues/3057 +[#4677]: https://github.com/AdguardTeam/AdGuardHome/issues/4677 [ddr-draft-06]: https://www.ietf.org/archive/id/draft-ietf-add-ddr-06.html diff --git a/internal/home/service_linux.go b/internal/home/service_linux.go index f27b7717..c885529b 100644 --- a/internal/home/service_linux.go +++ b/internal/home/service_linux.go @@ -9,7 +9,14 @@ import ( ) func chooseSystem() { - if sys := service.ChosenSystem(); sys.String() == "unix-systemv" { + sys := service.ChosenSystem() + // By default, package service uses the SysV system if it cannot detect + // anything other, but the update-rc.d fix should not be applied on OpenWrt, + // so exclude it explicitly. + // + // See https://github.com/AdguardTeam/AdGuardHome/issues/4480 and + // https://github.com/AdguardTeam/AdGuardHome/issues/4677. + if sys.String() == "unix-systemv" && !aghos.IsOpenWrt() { service.ChooseSystem(sysvSystem{System: sys}) } }