mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
luci-app-turboacc: Optimized the dns cache stop action (#8744)
The actual script dnscache-while.sh is still in the process after the DNS cache stops. This optimization completely stops the script and the DNS cache process
This commit is contained in:
parent
0ce82c9f14
commit
b535638922
@ -10,6 +10,8 @@ EXTRA_HELP=" check_status Check running status of utils"
|
|||||||
|
|
||||||
restart_utils="true"
|
restart_utils="true"
|
||||||
|
|
||||||
|
PS="/bin/busybox ps"
|
||||||
|
|
||||||
inital_conf(){
|
inital_conf(){
|
||||||
config_load "turboacc"
|
config_load "turboacc"
|
||||||
config_get "sw_flow" "config" "sw_flow" "0"
|
config_get "sw_flow" "config" "sw_flow" "0"
|
||||||
@ -201,8 +203,9 @@ start_dnsproxy() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stop_dnscache() {
|
stop_dnscache() {
|
||||||
killall -9 "dnscache"
|
$PS -w | grep dnscache | grep -v "grep" | awk '{print $1}' | xargs kill -9 >/dev/null 2>&1 &
|
||||||
kill -9 $(ps | grep dnscache-while.sh | grep -v "grep" | awk '{print $1}')
|
$PS -w | grep dnscache-while.sh | grep -v "grep" | awk '{print $1}' | xargs kill -9 >/dev/null 2>&1 &
|
||||||
|
killall -q -9 dnscache
|
||||||
rm -rf "/var/dnscache" "/var/run/dnscache"
|
rm -rf "/var/dnscache" "/var/run/dnscache"
|
||||||
echo "Stop DNS Caching"
|
echo "Stop DNS Caching"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user