Skip to content

Commit

Permalink
Update:Toolbox
Browse files Browse the repository at this point in the history
Whether the matching service is running
  • Loading branch information
MoGuangYu committed Sep 7, 2024
1 parent 1d5ea3e commit c6f976e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions box_bll/clash/Toolbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ GIT_URL="https://api.github.com/repos/MoGuangYu/Surfing/releases/latest"
RULES_URL_PREFIX="https://raw.githubusercontent.com/MoGuangYu/rules/main/Home/"
RULES=("YouTube.yaml" "TikTok.yaml" "Telegram.yaml" "OpenAI.yaml" "Netflix.yaml" "Microsoft.yaml" "Google.yaml" "Facebook.yaml" "Discord.yaml" "Apple.yaml")

CURRENT_VERSION="v10.1"
CURRENT_VERSION="v10.2"
TOOLBOX_URL="https://raw.githubusercontent.com/MoGuangYu/Surfing/main/box_bll/clash/Toolbox.sh"
TOOLBOX_FILE="/data/adb/box_bll/clash/Toolbox.sh"
get_remote_version() {
Expand Down Expand Up @@ -216,7 +216,7 @@ update_module
show_menu() {
while true; do
echo "=========="
echo "v10.1"
echo "v10.2"
echo "Menu Bar:"
echo "1. 重载配置"
echo "2. 清空数据库缓存"
Expand Down Expand Up @@ -746,17 +746,21 @@ update_web_panel() {
fi
echo "$meta_version $yacd_version" > "$WEB_PANEL_TIMESTAMP"
}

reload_configuration() {
if [ ! -f "$MODULE_PROP" ]; then
echo ""
echo "当前未安装模块!"
return
fi
if [ -f "/data/adb/modules/Surfing/disable" ]; then
echo ""
echo "服务未运行,重载操作失败!"
return
fi
echo ""
echo "正在重载 Clash 配置..."
curl -X PUT "$CLASH_RELOAD_URL" -d "{\"path\":\"$CLASH_RELOAD_PATH\"}"
if [ $? -eq 0 ];then
if [ $? -eq 0 ]; then
echo "ok"
else
echo "重载失败!"
Expand Down

0 comments on commit c6f976e

Please sign in to comment.