mirror of
https://github.com/CyberMind-FR/secubox-deb.git
synced 2026-07-28 21:17:36 +00:00
* fix(peertube): drain admin-ops results to a separate dir (fixes start-limit loop, ref #798) The root peertube-ops.path watches OPS_DIR with DirectoryNotEmpty=. process-ops wrote each <id>.result.json back into OPS_DIR, so the directory was never empty after draining a request → the .path re-triggered peertube-ops.service in a tight loop until systemd killed it with start-limit-hit, after which the mechanism died after the first op. Write results to a dedicated /run/secubox/peertube/results/ instead; process-ops rm's the request, leaving OPS_DIR empty so the watcher goes idle. The API's _read_op_result now polls RESULTS_DIR. tmpfiles + postinst create the dir (0750 secubox:secubox); peertubectl honors SECUBOX_PEERTUBE_RESULTS_DIR. test_process_ops.sh asserts results land in results/ and OPS_DIR is empty after draining (regression guard); test_ops_api monkeypatches both dirs. Verified live on gk2: two consecutive pings drain cleanly, NRestarts=0, no start-limit-hit, results root:secubox 0640 (secubox-readable). * fix(peertube): upgrade CWD must be peertube-latest/scripts + surface the error (ref #798) The webui upgrade button failed with a generic "upgrade script failed" and no detail. Two bugs in cmd_upgrade: 1. Wrong CWD. PeerTube's v8 shim peertube-latest/scripts/upgrade.sh execs `../dist/scripts/upgrade.sh` relative to CWD, and that dist script runs `node -e "require('js-yaml')…"` whose resolution is also CWD-relative. Running from `cd /var/www/peertube` made `../dist` → /var/www/dist (missing) → "cannot open ../dist/scripts/upgrade.sh"; a neutral CWD instead fails "Cannot find module 'js-yaml'". Fix: cd /var/www/peertube/peertube-latest/scripts (../dist resolves, and require() walks up to peertube-latest/node_modules). 2. Error was discarded to /dev/null, so the result only said "upgrade script failed". Now capture to /run/secubox/peertube/upgrade-<id>.log and fold the last lines into the error detail. Verified live: with the corrected CWD, 8.2.0 → 8.2.2 upgraded cleanly (download + deps + migrations), service restarted, /api/v1/config 200, serverVersion 8.2.2. --------- Co-authored-by: CyberMind-FR <gandalf@Gk2.net>
5 lines
200 B
Plaintext
5 lines
200 B
Plaintext
# SPDX-License-Identifier: LicenseRef-CMSD-1.0
|
|
d /run/secubox/peertube 0750 secubox secubox -
|
|
d /run/secubox/peertube/ops 0750 secubox secubox -
|
|
d /run/secubox/peertube/results 0750 secubox secubox -
|