fix: 尝试修复视频格式环境变量不生效和 ttyd 下载失败问题

This commit is contained in:
mofeng-git 2025-08-27 15:11:12 +08:00
parent 6299f04127
commit f900c4bb5a
2 changed files with 5 additions and 3 deletions

View File

@ -202,9 +202,11 @@ install_webterm() {
local ttyd_arch="$arch"
if [ "$arch" = "armhf" ]; then
ttyd_arch="armv7"
ttyd_arch="armhf"
elif [ "$arch" = "amd64" ]; then
ttyd_arch="x86_64" # ttyd 通常用 x86_64
ttyd_arch="x86_64"
elif [ "$arch" = "aarch64" ]; then
ttyd_arch="aarch64"
fi
echo "信息:在 chroot 环境中下载并安装 ttyd ($ttyd_arch)..."

View File

@ -221,7 +221,7 @@ EOF
fi
if [ ! -z "$VIDEOFORMAT" ]; then
if sed -i "s/format=mjpeg/format=$VIDEOFORMAT/g" /etc/kvmd/override.yaml; then
if sed -i "s/--format=mjpeg/--format=$VIDEOFORMAT/g" /etc/kvmd/override.yaml; then
log_info "视频输入格式已设置为 $VIDEOFORMAT"
fi
fi