修复确实的hls目录符号链接

This commit is contained in:
haotian 2026-02-27 16:32:31 +08:00
parent f52ec05384
commit 9838f54328

View File

@ -43,6 +43,14 @@ create_runtime_dirs() {
mkdir -p "$ALARMS_DIR"
mkdir -p "$CLIPS_DIR"
# 创建 HLS 符号链接,使 HTTP server 能访问 HLS 文件
# HLS 输出到 /var/lib/...,但 HTTP server 从 web_root/hls/ 提供文件
if [ ! -L "$INSTALL_DIR/web/hls" ]; then
rm -rf "$INSTALL_DIR/web/hls"
ln -s "$HLS_DIR" "$INSTALL_DIR/web/hls"
echo -e "${GREEN}${NC} 创建 HLS 符号链接: web/hls -> $HLS_DIR"
fi
# 设置权限(日志目录使用 orangepi 用户,方便查看和管理)
chown -R root:root "$RUNTIME_DIR"