openwrt_helloworld/mihomo/files/uci-defaults/migrate.sh
gitea-action 42da951219 mihomo: sync upstream
last commit: 71f9a40db1
2024-11-04 16:30:23 +08:00

22 lines
597 B
Bash

#!/bin/sh
. "$IPKG_INSTROOT/etc/mihomo/scripts/constants.sh"
# since v1.8.4
dns_doh_prefer_http3=$(uci -q get mihomo.mixin.dns_doh_prefer_http3); [ -z "$dns_doh_prefer_http3" ] && uci set mihomo.mixin.dns_doh_prefer_http3=0
# since v1.8.7
mixin_file_content=$(uci -q get mihomo.mixin.mixin_file_content); [ -z "$mixin_file_content" ] && uci set mihomo.mixin.mixin_file_content=$(uci -q get mihomo.config.mixin)
# since v1.9.3
start_delay=$(uci -q get mihomo.config.start_delay); [ -z "$start_delay" ] && uci set mihomo.config.start_delay=0
# commit
uci commit mihomo
# exit with 0
exit 0