openvibers/openvibe.live Commits

Serve history.js/navbar.js from /shared; deploy.sh installs unit files through sudo when systemctl does

OP OpenVibers committed 18 Sept 2026 · a9547bb91c · 2 files, +4 −2


Changes

ddiff --git a/deploy/scripts/deploy.sh b/deploy/scripts/deploy.sh
iindex 8de0f2fa..37a3cad5 100755
---- a/deploy/scripts/deploy.sh
++++ b/deploy/scripts/deploy.sh
@@@ -52,6 +52,8 @@ BASE_DIR="${BASE_DIR:-/opt/openvibe.live}"
SERVICE="${SERVICE:-openvibe-live}"
SYSTEMD_DIR="${SYSTEMD_DIR:-/etc/systemd/system}"
SYSTEMCTL="${SYSTEMCTL:-systemctl}"
++# Unit files land in /etc: when systemctl is being run through sudo, so is the install.
++SUDO_INSTALL=""; case "$SYSTEMCTL" in sudo*) SUDO_INSTALL="sudo";; esac; [ "$(id -u)" -eq 0 ] && SUDO_INSTALL=""
SITE_URL="${SITE_URL:-https://openvibe.live}"
API_URL="${API_URL:-http://127.0.0.1:3000}"
GIT_REMOTE="${GIT_REMOTE:-origin}"
@@@ -158,7 +160,7 @@ install_units() {
[ -f "$src" ] || return 0
if [ ! -f "$dest" ] || ! cmp -s "$src" "$dest"; then
say "installing $(basename "$dest")"
-- run install -m 0644 -D "$src" "$dest"
++ run $SUDO_INSTALL install -m 0644 -D "$src" "$dest"
changed=true
fi
}
ddiff --git a/server/index.js b/server/index.js
iindex 207660f3..785e9974 100644
---- a/server/index.js
++++ b/server/index.js
@@@ -435,7 +435,7 @@ app.use((req, res, next) => {
// Serve openvibe-shared browser assets at /shared/ — serve directly from the
// resolved source directory to avoid write operations (the public/ directory
// is read-only under systemd ProtectSystem=strict on production).
--const SHARED_BROWSER_FILES = ['theme-loader.js', 'notification-ui.js', 'account-switcher.js', 'openvibe-sw.js', 'footer.js', 'ov-mark.js', 'tooltip.js'];
++const SHARED_BROWSER_FILES = ['theme-loader.js', 'notification-ui.js', 'account-switcher.js', 'openvibe-sw.js', 'footer.js', 'ov-mark.js', 'tooltip.js', 'history.js', 'navbar.js'];
let sharedServePath = null;
(function resolveSharedAssets() {