From 52ddf2f0b5a0647a3ad311ee640be2abe3b26f89 Mon Sep 17 00:00:00 2001 From: Marc Benoit Date: Mon, 5 Sep 2022 14:52:07 -0400 Subject: [PATCH] nextdns: initialize nextdns from /etc/uci-defaults Signed-off-by: Marc Benoit (cherry picked from commit e54247a6fa9c03f286d38460c425d6dbd622b657) --- net/nextdns/Makefile | 10 +++------- net/nextdns/files/nextdns.defaults | 8 ++++++++ 2 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 net/nextdns/files/nextdns.defaults diff --git a/net/nextdns/Makefile b/net/nextdns/Makefile index d5276d400f..5a3fd840ce 100644 --- a/net/nextdns/Makefile +++ b/net/nextdns/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nextdns PKG_VERSION:=1.37.11 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=nextdns-$(PKG_VERSION).tar.gz PKG_SOURCE_VERSION:=v$(PKG_VERSION) @@ -50,13 +50,9 @@ define Package/nextdns/install $(INSTALL_DIR) $(1)/etc/config $(INSTALL_CONF) ./files/nextdns.config $(1)/etc/config/nextdns -endef -define Package/nextdns/postinst -#!/bin/sh -if [ -z "$${IPKG_INSTROOT}" ]; then - nextdns install -fi + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) ./files/nextdns.defaults $(1)/etc/uci-defaults/nextdns endef define Package/nextdns/prerm diff --git a/net/nextdns/files/nextdns.defaults b/net/nextdns/files/nextdns.defaults new file mode 100644 index 0000000000..7ea059aceb --- /dev/null +++ b/net/nextdns/files/nextdns.defaults @@ -0,0 +1,8 @@ +#!/bin/sh + +/usr/sbin/nextdns install +# opkg automatically enables each service, but not image builder, +# so enable it here to cover both cases +/etc/init.d/nextdns enable + +exit 0 -- 2.30.2