mirror of
https://github.com/openwrt/packages.git
synced 2025-12-28 10:00:06 +04:00
nextdns: initialize nextdns from /etc/uci-defaults
Signed-off-by: Marc Benoit <marcb62185@gmail.com>
(cherry picked from commit e54247a6fa)
This commit is contained in:
committed by
Tianling Shen
parent
3ecfd00e02
commit
ef16908da7
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=nextdns
|
||||
PKG_VERSION:=1.38.0
|
||||
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
|
||||
|
||||
8
net/nextdns/files/nextdns.defaults
Normal file
8
net/nextdns/files/nextdns.defaults
Normal 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
|
||||
Reference in New Issue
Block a user