luci-app-unblockmusic: Refresh ipset music list when ifup (#4576)

* luci-app-unblockmusic: Refresh ipset music list when ifup

* Update 099-unblockmusic
This commit is contained in:
Hugo Yuan 2020-05-20 10:02:10 +08:00 committed by CN_SZTL
parent f8099f4c95
commit 684bce1183
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
3 changed files with 2 additions and 1 deletions

View File

@ -3,4 +3,5 @@
[ "$ACTION" = ifup ] || exit 0
sleep 10
ipset flush music 2>/dev/null
/usr/share/UnblockNeteaseMusic/getmusicip.sh

View File

@ -111,6 +111,7 @@ del_rule(){
$ipt_n -X CLOUD_MUSIC 2>/dev/null
iptables -D OUTPUT -d 223.252.199.10 -j DROP 2>/dev/null
ipset flush music 2>/dev/null
ipset -X music_http 2>/dev/null
ipset -X music_https 2>/dev/null

View File

@ -11,7 +11,6 @@ while true
do
icount=`busybox ps -w | grep UnblockNeteaseMusic | grep -v grep | grep -v logcheck.sh`
if [ -z "$icount" ]; then
/usr/share/UnblockNeteaseMusic/getmusicip.sh
/etc/init.d/unblockmusic restart
fi
log_size=$(expr $(ls -l $log_file | awk '{print $5}') / 1024)