Skip to content

Commit

Permalink
add mihomo config-common check
Browse files Browse the repository at this point in the history
  • Loading branch information
pmkol authored Jun 30, 2024
1 parent 5118f5e commit a5f148e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions openwrt/scripts/10-customize-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ rm -rf package/new/helloworld/patch-luci-app-ssr-plus.patch

# add mihomo
git clone https://$github/pmkol/openwrt-mihomo package/new/openwrt-mihomo
mkdir -p files/etc/mihomo/run/ui
curl -Lso files/etc/mihomo/run/Country.mmdb https://$github/MetaCubeX/meta-rules-dat/releases/download/latest/country-lite.mmdb
curl -Lso metacubexd-gh-pages.tar.gz https://$github/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.tar.gz
tar zxf metacubexd-gh-pages.tar.gz && rm metacubexd-gh-pages.tar.gz
mv metacubexd-gh-pages files/etc/mihomo/run/ui/metacubexd
if curl -s "https://$mirror/openwrt/23-config-common" | grep -q "^CONFIG_PACKAGE_luci-app-mihomo=y"; then
mkdir -p files/etc/mihomo/run/ui
curl -Lso files/etc/mihomo/run/Country.mmdb https://$github/MetaCubeX/meta-rules-dat/releases/download/latest/country-lite.mmdb
curl -Lso metacubexd-gh-pages.tar.gz https://$github/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.tar.gz
tar zxf metacubexd-gh-pages.tar.gz
rm metacubexd-gh-pages.tar.gz
mv metacubexd-gh-pages files/etc/mihomo/run/ui/metacubexd
fi

# change geodata
rm -rf package/new/helloworld/v2ray-geodata
Expand Down

0 comments on commit a5f148e

Please sign in to comment.