[packages] miniupnpd: restart daemon if internal iface is ifup'd
git-svn-id: svn://svn.openwrt.org/openwrt/packages@25593 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
a36b3c870e
commit
a7b34e2b1e
@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||||||
|
|
||||||
PKG_NAME:=miniupnpd
|
PKG_NAME:=miniupnpd
|
||||||
PKG_VERSION:=1.5
|
PKG_VERSION:=1.5
|
||||||
PKG_RELEASE:=5
|
PKG_RELEASE:=6
|
||||||
PKG_MD5SUM:=063f03a2a8363b9d4cb0f73b20b8dfce
|
PKG_MD5SUM:=063f03a2a8363b9d4cb0f73b20b8dfce
|
||||||
|
|
||||||
PKG_SOURCE_URL:=http://miniupnp.free.fr/files
|
PKG_SOURCE_URL:=http://miniupnp.free.fr/files
|
||||||
@ -41,11 +41,12 @@ define Build/Compile
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/miniupnpd/install
|
define Package/miniupnpd/install
|
||||||
$(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/config $(1)/etc/hotplug.d/firewall
|
$(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/config $(1)/etc/hotplug.d/iface $(1)/etc/hotplug.d/firewall
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/miniupnpd $(1)/usr/bin/miniupnpd
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/miniupnpd $(1)/usr/bin/miniupnpd
|
||||||
$(INSTALL_BIN) ./files/miniupnpd.init $(1)/etc/init.d/miniupnpd
|
$(INSTALL_BIN) ./files/miniupnpd.init $(1)/etc/init.d/miniupnpd
|
||||||
$(INSTALL_CONF) ./files/upnpd.config $(1)/etc/config/upnpd
|
$(INSTALL_CONF) ./files/upnpd.config $(1)/etc/config/upnpd
|
||||||
$(INSTALL_DATA) ./files/miniupnpd.hotplug $(1)/etc/hotplug.d/firewall/50-miniupnpd
|
$(INSTALL_DATA) ./files/miniupnpd.iface.hotplug $(1)/etc/hotplug.d/iface/50-miniupnpd
|
||||||
|
$(INSTALL_DATA) ./files/miniupnpd.firewall.hotplug $(1)/etc/hotplug.d/firewall/50-miniupnpd
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,miniupnpd))
|
$(eval $(call BuildPackage,miniupnpd))
|
||||||
|
7
net/miniupnpd/files/miniupnpd.iface.hotplug
Normal file
7
net/miniupnpd/files/miniupnpd.iface.hotplug
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
/etc/init.d/miniupnpd enabled && [ -n "`pidof miniupnpd`" ] && {
|
||||||
|
local intif="$(uci_get upnpd config internal_iface)"
|
||||||
|
[ "$ACTION" = "ifup" ] && [ "$INTERFACE" = "$intif" ] && \
|
||||||
|
/etc/init.d/miniupnpd restart
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user