mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
luci-app-adbyby-plus: update script to get rules
This commit is contained in:
parent
377a1217cb
commit
eb2dd520c0
@ -10,7 +10,7 @@ LUCI_DEPENDS:=+adbyby +wget +ipset +dnsmasq-full
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_NAME:=luci-app-adbyby-plus
|
||||
PKG_VERSION:=2.0
|
||||
PKG_RELEASE:=66
|
||||
PKG_RELEASE:=67
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
START=98
|
||||
STOP=10
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
EXTRA_COMMANDS="add_rule del_rule reload_rule"
|
||||
PROG_PATH=/usr/share/adbyby
|
||||
@ -188,7 +187,7 @@ reload_rule()
|
||||
iptables-save | grep ADBYBY >/dev/null || add_rule
|
||||
}
|
||||
|
||||
start_service()
|
||||
start()
|
||||
{
|
||||
config_load adbyby
|
||||
config_foreach get_config adbyby
|
||||
@ -198,12 +197,7 @@ start_service()
|
||||
[ ! -d "/tmp/adbyby/data" ] && cp -a /usr/share/adbyby /tmp/ && rm -f /tmp/adbyby.updated
|
||||
add_rules
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command '/tmp/adbyby/adbyby'
|
||||
procd_append_param command '--no-daemon'
|
||||
procd_set_param respawn
|
||||
procd_set_param stderr 1
|
||||
procd_close_instance
|
||||
/tmp/adbyby/adbyby >/dev/null 2>&1 &
|
||||
|
||||
add_dns
|
||||
iptables-save | grep ADBYBY >/dev/null || \
|
||||
@ -212,8 +206,9 @@ start_service()
|
||||
fi
|
||||
}
|
||||
|
||||
stop_service()
|
||||
stop()
|
||||
{
|
||||
kill -9 $(busybox ps -w | grep "/tmp/adbyby" | grep -v grep | awk '{print $1}') >/dev/null 2>&1
|
||||
config_load adbyby
|
||||
config_foreach get_config adbyby
|
||||
del_rule
|
||||
|
@ -43,6 +43,6 @@ if [ ! -f "/tmp/adbyby.updated" ];then
|
||||
|
||||
rm -f /tmp/adbyby/data/*.bak
|
||||
|
||||
kill -9 $(busybox ps -w | grep 'adbyby --no-daemon' | grep -v grep | awk '{print $1}') >/dev/null 2>&1
|
||||
/etc/init.d/adbyby restart
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user