mirror of
https://github.com/remittor/zapret-openwrt.git
synced 2025-12-06 11:36:48 +03:00
install: Check service running before stop
This commit is contained in:
@@ -108,7 +108,9 @@ if [ -z "$${IPKG_INSTROOT}" ]; then
|
|||||||
fi
|
fi
|
||||||
if [ "$${PKG_UPGRADE}" = "1" ]; then
|
if [ "$${PKG_UPGRADE}" = "1" ]; then
|
||||||
# stop service if PKG_UPGRADE
|
# stop service if PKG_UPGRADE
|
||||||
[ -x "/etc/init.d/zapret" ] && /etc/init.d/zapret stop >/dev/null 2>&1
|
if [ -x "/etc/init.d/zapret" ]; then
|
||||||
|
/etc/init.d/zapret running && /etc/init.d/zapret stop >/dev/null 2>&1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [ ! -f "/opt/zapret/ipset/zapret-hosts-google.txt" ]; then
|
if [ ! -f "/opt/zapret/ipset/zapret-hosts-google.txt" ]; then
|
||||||
if [ -f "/opt/zapret/ipset/zapret-hosts-user.txt" ]; then
|
if [ -f "/opt/zapret/ipset/zapret-hosts-user.txt" ]; then
|
||||||
@@ -186,8 +188,8 @@ if [ -z "$${IPKG_INSTROOT}" ]; then
|
|||||||
. "$${ZAPRET_BASE}/common/fwtype.sh"
|
. "$${ZAPRET_BASE}/common/fwtype.sh"
|
||||||
. "$${ZAPRET_BASE}/common/nft.sh"
|
. "$${ZAPRET_BASE}/common/nft.sh"
|
||||||
. "$${ZAPRET_BASE}/common/installer.sh"
|
. "$${ZAPRET_BASE}/common/installer.sh"
|
||||||
|
/etc/init.d/zapret running && /etc/init.d/zapret stop
|
||||||
/etc/init.d/zapret disable
|
/etc/init.d/zapret disable
|
||||||
/etc/init.d/zapret stop
|
|
||||||
ps w | grep '/opt/zapret/nfq/nfqws' | grep -v grep | awk '{print $$1}' | xargs -r kill -9
|
ps w | grep '/opt/zapret/nfq/nfqws' | grep -v grep | awk '{print $$1}' | xargs -r kill -9
|
||||||
remove_openwrt_firewall
|
remove_openwrt_firewall
|
||||||
nft_del_table
|
nft_del_table
|
||||||
|
|||||||
Reference in New Issue
Block a user