mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
- 调整音视频架构,提升 RKMPP 编码 MJPEG-->H264 性能,同时解决丢帧马赛克问题; - 删除多用户逻辑,只保留单用户,支持设置 web 单会话; - 修复删除体验不好的的回退逻辑,前端页面菜单位置微调; - 增加 OTG USB 设备动态调整功能; - 修复 mdns 问题,webrtc 视频切换更顺畅。
48 lines
1018 B
Bash
48 lines
1018 B
Bash
#!/bin/bash
|
|
# One-KVM initialization script
|
|
# Container entrypoint to start the one-kvm service
|
|
|
|
set -e
|
|
|
|
# Start one-kvm with default options.
|
|
# Additional options can be passed via environment variables.
|
|
|
|
# Data directory (prefer DATA_DIR, keep ONE_KVM_DATA_DIR for backward compatibility)
|
|
DATA_DIR="${DATA_DIR:-${ONE_KVM_DATA_DIR:-/etc/one-kvm}}"
|
|
ARGS=(-d "$DATA_DIR")
|
|
|
|
# Enable HTTPS if requested
|
|
if [ "${ENABLE_HTTPS:-false}" = "true" ]; then
|
|
ARGS+=(--enable-https)
|
|
fi
|
|
|
|
# Custom bind address
|
|
if [ -n "$BIND_ADDRESS" ]; then
|
|
ARGS+=(-a "$BIND_ADDRESS")
|
|
fi
|
|
|
|
# Custom port
|
|
if [ -n "$HTTP_PORT" ]; then
|
|
ARGS+=(-p "$HTTP_PORT")
|
|
fi
|
|
|
|
# Custom HTTPS port
|
|
if [ -n "$HTTPS_PORT" ]; then
|
|
ARGS+=(--https-port "$HTTPS_PORT")
|
|
fi
|
|
|
|
# Verbosity level
|
|
if [ -n "$VERBOSE" ]; then
|
|
case "$VERBOSE" in
|
|
1) ARGS+=(-v) ;;
|
|
2) ARGS+=(-vv) ;;
|
|
3) ARGS+=(-vvv) ;;
|
|
esac
|
|
fi
|
|
|
|
echo "[INFO] Starting one-kvm..."
|
|
echo "[INFO] Arguments: ${ARGS[*]}"
|
|
|
|
# Execute one-kvm
|
|
exec /usr/bin/one-kvm "${ARGS[@]}"
|