Skip to content

Commit

Permalink
更换端口占用判断为netstat
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrohy committed Dec 2, 2020
1 parent bfa0935 commit 56bde07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion v2ray_util/global_setting/clean_iptables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ clean_iptables(){
echo "$RESULT" | while read LINE
do
LINE_ARRAY=($LINE)
if [[ ${LINE_ARRAY[1]} && -z $(lsof -i:${LINE_ARRAY[1]}) ]];then
if [[ ${LINE_ARRAY[1]} && -z $(netstat -tunlp|grep -w ${LINE_ARRAY[1]}) ]];then
[[ $NETWORK == 1 ]] && ip6tables -D $TYPE ${LINE_ARRAY[0]} || iptables -D $TYPE ${LINE_ARRAY[0]}
fi
done
Expand Down

0 comments on commit 56bde07

Please sign in to comment.