Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
vernesong committed Dec 8, 2024
1 parent 0fff497 commit 28de0ad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions luci-app-openclash/root/etc/uci-defaults/luci-openclash
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ uci -q commit openclash
#Restore
if [ -f "/tmp/openclash.bak" ]; then
#delete old geosite database first
rm -rf "/tmp/openclash/GeoSite.dat" >/dev/null 2>&1
if [ "/etc/openclash/GeoSite.dat" -nt "/tmp/openclash/GeoSite.dat" ]; then
rm -rf "/tmp/openclash/GeoSite.dat" >/dev/null 2>&1
fi
mv -f "/tmp/openclash.bak" "/etc/config/openclash" >/dev/null 2>&1
cp -rf "/tmp/openclash/." "/etc/openclash/" >/dev/null 2>&1
if [ -d "/tmp/openclash_dashboard/" ]; then
Expand All @@ -129,7 +131,6 @@ if [ -f "/tmp/openclash.bak" ]; then
rm -rf "/etc/openclash/custom/openclash_sniffing_ports_filter.yaml" >/dev/null 2>&1
rm -rf "/etc/openclash/custom/openclash_sniffing_port_filter.yaml" >/dev/null 2>&1
rm -rf "/etc/openclash/custom/openclash_sniffing_domain_filter.yaml" >/dev/null 2>&1
rm -rf "/etc/config/openclash.apk-new" >/dev/null 2>&1
fi

uci -q set openclash.config.enable=0
Expand Down

0 comments on commit 28de0ad

Please sign in to comment.