kiddin9 / openwrt-packages

openwrt packages
GNU General Public License v2.0
1.61k stars 587 forks source link

mosdns在Rpi4中运行不起来 #96

Open BI7PRK opened 1 year ago

BI7PRK commented 1 year ago

版本号:MOSDNS 5.1.3 错误日志

Error: fail to load config, failed to read config: Config File "config" Not Found in "[/]"
BI7PRK commented 1 year ago

bug定位: 在/usr/share/mosdns/mosdns.sh中,UCI 实体不正确 eg.

uci -q get mosdns.config

uci show mosdns

输出为:

mosdns.mosdns=mosdns
mosdns.mosdns.autoconf='1'
mosdns.mosdns.not_first_start='1'
mosdns.mosdns.geo_update_week_time='*'
mosdns.mosdns.syncconfig='0'
mosdns.mosdns.geo_auto_update='1'
mosdns.mosdns.geo_update_day_time='3'
mosdns.mosdns.redirect='0'
mosdns.mosdns.enabled='1'
mosdns.mosdns.configfile='/etc/mosdns/config_custom.yaml'

纠正: /etc/config/mosdns

config mosdns 'config' <<---- 这里改成这样
    option autoconf '1'
    option not_first_start '1'
    option geo_update_week_time '*'
    option syncconfig '0'
    option geo_auto_update '1'
    option geo_update_day_time '3'
    option redirect '0'
    option enabled '1'
    option configfile '/etc/mosdns/config_custom.yaml'