h69k/package/emortal/default-settings/files/99-default-settings-chinese
2024-11-13 21:14:54 +08:00

31 lines
883 B
Bash
Executable File

#!/bin/sh
uci -q get system.@imm_init[0] > "/dev/null" || uci -q add system imm_init > "/dev/null"
if ! uci -q get system.@imm_init[0].system_chn > "/dev/null"; then
uci -q batch <<-EOF
set system.@system[0].timezone="CST-8"
set system.@system[0].zonename="Asia/Shanghai"
delete system.ntp.server
add_list system.ntp.server="ntp.tencent.com"
add_list system.ntp.server="ntp1.aliyun.com"
add_list system.ntp.server="ntp.ntsc.ac.cn"
add_list system.ntp.server="cn.ntp.org.cn"
set system.@imm_init[0].system_chn="1"
commit system
EOF
fi
opkg_mirror="$(uci -q get system.@imm_init[0].opkg_mirror)"
if [ -z "$opkg_mirror" ]; then
opkg_mirror="https://mirrors.vsean.net/openwrt"
uci -q set system.@imm_init[0].opkg_mirror="$opkg_mirror"
uci -q commit system
fi
sed -i.bak "s,https://downloads.immortalwrt.org,$opkg_mirror,g" "/etc/opkg/distfeeds.conf"
exit 0