dsh/meshtastic_mqtt_server:fix/install-sh-web-block-indent
main
install.sh 生成 config.yaml 的 heredoc 中,web: 块缩进与 driver:/sqlite:/mysql: 同级,被 YAML 解析为 database.web。程序只读取顶层 web(rawWebConfig),因此全新部署时:
web:
driver:/sqlite:/mysql:
database.web
web
web.admin.password: admin
host: 0.0.0.0
if [[ ! -f config.yaml ]] 分支每次全新部署都会走到,故必现。
if [[ ! -f config.yaml ]]
database:
web.admin.password
port_enabled
socket_enabled
database.web.admin.password
broker_started
web_started
bash -n install.sh
No dependencies set.
The note is not visible to the blocked user.
问题
install.sh 生成 config.yaml 的 heredoc 中,
web:块缩进与driver:/sqlite:/mysql:同级,被 YAML 解析为database.web。程序只读取顶层web(rawWebConfig),因此全新部署时:web.admin.password: admin+host: 0.0.0.0if [[ ! -f config.yaml ]]分支每次全新部署都会走到,故必现。修复
web:块移出database:,回到顶层(2 空格缩进),随机口令正确落在web.admin.passwordport_enabled/socket_enabled字段(与生产配置一致,避免首启触发缺字段回写)验证
web、密码落在database.web.admin.password;修复后web回到顶层broker_started+web_started,启动守卫通过bash -n install.sh语法检查通过