diff --git a/gl-inet.sh b/gl-inet.sh index 5dc6d49..4aa7277 100755 --- a/gl-inet.sh +++ b/gl-inet.sh @@ -40,16 +40,18 @@ install_istore_os_style() { is-opkg install 'app-meta-ddnsto' # 安装磁盘管理 is-opkg install 'app-meta-diskman' - # 若已安装iStore商店则在概览中追加iStore字样 - if ! grep -q " like iStoreOS" /tmp/sysinfo/model; then - sed -i '1s/$/ like iStoreOS/' /tmp/sysinfo/model - fi + FILE_PATH="/etc/openwrt_release" + NEW_DESCRIPTION="Openwrt like iStoreOS Style by wukongdaily" + CONTENT=$(cat $FILE_PATH) + UPDATED_CONTENT=$(echo "$CONTENT" | sed "s/DISTRIB_DESCRIPTION='[^']*'/DISTRIB_DESCRIPTION='$NEW_DESCRIPTION'/") + echo "$UPDATED_CONTENT" >$FILE_PATH } # 安装iStore 参考 https://github.com/linkease/istore do_istore() { echo "do_istore method==================>" - ISTORE_REPO=https://istore.linkease.com/repo/all/store + # 换源 + ISTORE_REPO=https://istore.istoreos.com/repo/all/store FCURL="curl --fail --show-error" curl -V >/dev/null 2>&1 || { @@ -73,6 +75,10 @@ do_istore() { /tmp/is-opkg opkg install --force-reinstall luci-app-store || exit $? [ -s "/etc/init.d/tasks" ] || /tmp/is-opkg opkg install --force-reinstall taskd [ -s "/usr/lib/lua/luci/cbi.lua" ] || /tmp/is-opkg opkg install luci-compat >/dev/null 2>&1 + # 换源 + sed -i 's/istore.linkease.com/istore.istoreos.com/g' /bin/is-opkg + sed -i 's/istore.linkease.com/istore.istoreos.com/g' /etc/opkg/compatfeeds.conf + sed -i 's/istore.linkease.com/istore.istoreos.com/g' /www/luci-static/istore/index.js } #设置风扇工作温度 @@ -472,7 +478,7 @@ do_install_docker_compose() { } #mt3000更换分区 -mt3000_overlay_changed(){ +mt3000_overlay_changed() { wget -O mt3000.sh "https://cafe.cpolar.cn/wkdaily/gl-inet-onescript/raw/branch/master/mt-3000/mt3000.sh" && chmod +x mt3000.sh sh mt3000.sh }