Skip to content

Commit

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

0 comments on commit bc69546

Please sign in to comment.