This commit is contained in:
root
2026-05-18 06:48:30 +00:00
parent f1145e3a36
commit e638a4656c
14 changed files with 172 additions and 11 deletions

View File

@@ -16,6 +16,7 @@ ENABLE_NETDATA=0
ensure_live_user
normalize_repo_root
ensure_runtime_dirs_owned_by_live
install_base_packages
install_media_packages
configure_adb_udev
@@ -40,4 +41,5 @@ prepare_srs
run_hardware_probe
# 与 install-hub 一致:装 Caddy live-edgehttp://live.local:80 → 本机控制平面 PORT默认 8001
install_live_edge_proxy
ensure_runtime_dirs_owned_by_live
print_summary "business"

View File

@@ -13,6 +13,7 @@ ENABLE_SRS=0
ensure_live_user
normalize_repo_root
ensure_runtime_dirs_owned_by_live
install_base_packages
install_media_packages
configure_adb_udev
@@ -42,4 +43,5 @@ prepare_homepage
prepare_filebrowser
run_hardware_probe
install_live_edge_proxy
ensure_runtime_dirs_owned_by_live
print_summary "hub"

View File

@@ -460,6 +460,24 @@ normalize_repo_root() {
WEBTTY_SHELL="$ROOT_DIR/scripts/linux/webtty_shell.sh"
}
ensure_runtime_dirs_owned_by_live() {
local rel path
for rel in \
config \
logs \
downloads \
backup \
backup_config \
.pm2 \
.process_runner \
services/neko/data
do
path="$ROOT_DIR/$rel"
mkdir -p "$path"
chown -R live:live "$path" 2>/dev/null || true
done
}
install_base_packages() {
log "Installing base packages"
export DEBIAN_FRONTEND=noninteractive

View File

@@ -12,6 +12,7 @@ load_env
# git pull 若以 root 执行,避免 live 用户无法写 venv / node_modules
chown -R live:live "$ROOT_DIR" || true
ensure_runtime_dirs_owned_by_live
log "Refreshing Python venv + requirements"
prepare_python_runtime
@@ -30,6 +31,8 @@ else
log "ENABLE_LIVE_EDGE_PROXY is not 1 — skipping live-edge (direct :${PORT})"
fi
ensure_runtime_dirs_owned_by_live
ok=0
for _ in 1 2 3 4 5 6; do
if curl -sf -m 6 "http://127.0.0.1:${PORT}/health" >/dev/null; then