Skip to content

Commit

Permalink
Determine whether the package exists to prevent crash error
Browse files Browse the repository at this point in the history
  • Loading branch information
heinu123 committed Mar 30, 2024
1 parent 58f259f commit 1928a3a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions module/clash/scripts/clash.service
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ edit_tun() {
ip4list="${ip4list}\n - ${appuid}"
continue
fi
if [ "$(awk '$1~/'^"${package}"$'/{print $2}' ${system_packages_file})" == "" ]; then
log "warn: ${package}未找到."
continue
fi
uidlist="${uidlist}\n - ${appuid}"
if [ "${mode}" == "blacklist" ]; then
log "info: ${appuid}已排除."
Expand Down

0 comments on commit 1928a3a

Please sign in to comment.