1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-20 23:58:38 +02:00

nextdns: initialize nextdns from /etc/uci-defaults

Signed-off-by: Marc Benoit <marcb62185@gmail.com>
This commit is contained in:
Marc Benoit 2022-09-05 14:52:07 -04:00 committed by Rosen Penev
parent 4ab30bf712
commit e54247a6fa
2 changed files with 11 additions and 7 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=nextdns PKG_NAME:=nextdns
PKG_VERSION:=1.37.11 PKG_VERSION:=1.37.11
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_SOURCE:=nextdns-$(PKG_VERSION).tar.gz PKG_SOURCE:=nextdns-$(PKG_VERSION).tar.gz
PKG_SOURCE_VERSION:=v$(PKG_VERSION) PKG_SOURCE_VERSION:=v$(PKG_VERSION)
@ -50,13 +50,9 @@ define Package/nextdns/install
$(INSTALL_DIR) $(1)/etc/config $(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/nextdns.config $(1)/etc/config/nextdns $(INSTALL_CONF) ./files/nextdns.config $(1)/etc/config/nextdns
endef
define Package/nextdns/postinst $(INSTALL_DIR) $(1)/etc/uci-defaults
#!/bin/sh $(INSTALL_BIN) ./files/nextdns.defaults $(1)/etc/uci-defaults/nextdns
if [ -z "$${IPKG_INSTROOT}" ]; then
nextdns install
fi
endef endef
define Package/nextdns/prerm define Package/nextdns/prerm

View File

@ -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