fix: set HOME=/root for rbenv installs to prevent path mismatch

When running in certain LXC environments (e.g. systems with desktop
packages or non-en locales), the HOME variable may resolve to '/'
instead of '/root'. rbenv installs to $HOME/.rbenv, so if HOME is
wrong it ends up in /.rbenv while all service files and PATH exports
hardcode /root/.rbenv, causing 'env: ruby: No such file or directory'.

Explicitly set HOME=/root for all setup_ruby calls that run as root,
and replace all $HOME/.rbenv references in PATH exports and install
steps with /root/.rbenv literals.

Affected scripts:
- ct/sure.sh + install/sure-install.sh (fixes #14479)
- ct/dawarich.sh + install/dawarich-install.sh
- ct/docuseal.sh + install/docuseal-install.sh

Also add TimeoutStartSec=300 to sure.service so db:prepare on first
start does not get killed by the default 90s systemd timeout.
This commit is contained in:
MickLesk
2026-05-17 20:27:13 +02:00
parent 131a9d60f1
commit ebf755031b
6 changed files with 10 additions and 9 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ function update_script() {
msg_info "Building Application"
cd /opt/docuseal
export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"
export PATH="/root/.rbenv/bin:/root/.rbenv/shims:${PATH}"
eval "$(rbenv init - bash)" 2>/dev/null || true
export RAILS_ENV=production
export NODE_ENV=production