Skip to content

Commit

Permalink
fix #309
Browse files Browse the repository at this point in the history
  • Loading branch information
morytyann committed Nov 25, 2024
1 parent 4911e02 commit 19befdc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion luci-app-mihomo/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include $(TOPDIR)/rules.mk

PKG_VERSION:=1.13.0
PKG_VERSION:=1.13.1

LUCI_TITLE:=LuCI Support for mihomo
LUCI_DEPENDS:=+luci-base +mihomo
Expand Down
8 changes: 7 additions & 1 deletion mihomo/files/mihomo.init
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,14 @@ start_service() {
cp -f "$profile_file" "$RUN_PROFILE_PATH"
elif [[ "$profile" == "subscription:"* ]]; then
local subscription_section; subscription_section="${profile/subscription:/}"
local subscription_name subscription_prefer
config_get subscription_name "$subscription_section" "name"
config_get subscription_prefer "$subscription_section" "prefer" "remote"
log "Use Subscription: $subscription_name."
local subscription_file; subscription_file="$SUBSCRIPTIONS_DIR/$subscription_section.yaml"
update_subscription "$subscription_section"
if [ "$subscription_prefer" == "remote" ] || [[ "$subscription_prefer" == "local" && ! -f "$subscription_file" ]]; then
update_subscription "$subscription_section"
fi
if [ ! -f "$subscription_file" ]; then
log "Subscription file not found."
log "Exiting..."
Expand Down

0 comments on commit 19befdc

Please sign in to comment.