Skip to content

Commit

Permalink
0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
LIghtJUNction committed Oct 26, 2024
1 parent 8693c0d commit 325745b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MyModule/customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ MagicNet="/data/adb/modules/MagicNet"
if [-d "$MagicNet" ]; then
ui_print ": 开始更新模块 -- 备份订阅链接到临时目录"
if [ -f "$MagicNet/env" ]; then
cp -f "$MagicNet/env" "$TMPDIR/MagicNet/env" # 恢复订阅链接
ui_print "原订阅链接保存在: $TMPDIR/MagicNet/env"
cp -f "$MagicNet/env" "$TMPDIR/MagicNet/env" # 恢复订阅链接
ui_print "原订阅链接保存在: $TMPDIR/MagicNet/env"
else
ui_print "源文件 $MagicNet/env 不存在,跳过备份订阅链接"
ui_print "源文件 $MagicNet/env 不存在,跳过备份订阅链接"
fi
fi

Expand Down
4 changes: 4 additions & 0 deletions MyModule/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ clean_old_logs
if [ "$url" = "订阅链接" ]; then
status="请在${mihomo_config}或者env文件中修改订阅链接😶‍🌫️"
url=$(grep '^url=' "$ENV_FILE" | cut -d '=' -f 2)
if ["$url" != "订阅链接"]; then
set_sub_url "$url"
status="成功恢复订阅链接😊"
fi
else
status="已填写😊"
echo "url=$url" > $MODDIR/env
Expand Down

0 comments on commit 325745b

Please sign in to comment.