mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
haproxy: Rework hotplug script for HAProxy
- The old hotplug script caused long boot-times for r7800 and possibly others. The new script is now only triggered by iface changes for wan and lan interfaces. Signed-off-by: Christian Lachner <gladiac@gmail.com>
This commit is contained in:
@@ -172,8 +172,8 @@ define Package/haproxy/install
|
|||||||
$(INSTALL_CONF) ./files/haproxy.cfg $(1)/etc/
|
$(INSTALL_CONF) ./files/haproxy.cfg $(1)/etc/
|
||||||
$(INSTALL_DIR) $(1)/etc/init.d
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
$(INSTALL_BIN) ./files/haproxy.init $(1)/etc/init.d/haproxy
|
$(INSTALL_BIN) ./files/haproxy.init $(1)/etc/init.d/haproxy
|
||||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/net
|
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
|
||||||
$(INSTALL_BIN) ./files/haproxy.hotplug $(1)/etc/hotplug.d/net/90-haproxy
|
$(INSTALL_BIN) ./files/haproxy.hotplug $(1)/etc/hotplug.d/iface/90-haproxy
|
||||||
endef
|
endef
|
||||||
|
|
||||||
Package/haproxy-nossl/install = $(Package/haproxy/install)
|
Package/haproxy-nossl/install = $(Package/haproxy/install)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ "$ACTION" = add ]; then
|
[ "$INTERFACE" == "wan" ] || [ "$INTERFACE" == "lan" ] || return
|
||||||
|
[ "$ACTION" == "ifup" ] &&
|
||||||
/etc/init.d/haproxy enabled && \
|
/etc/init.d/haproxy enabled && \
|
||||||
/etc/init.d/haproxy start
|
/etc/init.d/haproxy start
|
||||||
fi
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user