Files
ProxmoxVE/ct/rackula.sh
T
push-app-to-main[bot] cd9c920d48 Rackula (#15465)
* Add rackula (ct)

* Update rackula.sh

* Update install/rackula-install.sh

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>

* Update install/rackula-install.sh

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>

* fix(rackula): install Bun outside /root so hardened service unit can exec it (#15540)

rackula-api.service ships with ProtectHome=true and
ExecStart=/usr/local/bin/bun. With BUN_INSTALL=/root/.bun the symlink
resolves into /root, which is masked in the unit's mount namespace, so
the service fails with status=203/EXEC and crash-loops. Use /opt/bun
instead, matching yubal and gitea-mirror.

Also drop the unused BUN_VERSION/BUN_VARIANT block (bun.sh/install
takes the version as a positional arg and detects avx2/baseline
itself, so the env vars were dead code) and restore the msg_ok
"Installed Bun" / msg_info "Setting up Rackula" pair.


Claude-Session: https://claude.ai/code/session_011sGajwSQGg1vd6m2AC6Byq

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

* Refactor rackula-install.sh to streamline installation

Removed checks for security headers config file and adjusted installation steps for Bun and Rackula.

---------

Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
Co-authored-by: CanbiZ (MickLesk) <47820557+MickLesk@users.noreply.github.com>
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
Co-authored-by: Gareth Evans <63365672+ggfevans@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 11:06:43 +02:00

82 lines
2.8 KiB
Bash
Executable File

#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: gVNS (ggfevans)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/RackulaLives/Rackula
APP="Rackula"
var_tags="${var_tags:-homelab}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-512}"
var_disk="${var_disk:-8}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_arm64="${var_arm64:-yes}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/rackula ]]; then
msg_error "No ${APP} Installation Found!"
exit 1
fi
if check_for_gh_release "rackula" "RackulaLives/Rackula"; then
msg_info "Stopping Services"
systemctl stop rackula-api nginx
msg_ok "Stopped Services"
create_backup /opt/rackula/data
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "rackula" "RackulaLives/Rackula" "prebuild" "latest" "/opt/rackula" "rackula-lxc-*.tar.gz"
restore_backup
msg_info "Updating Configuration"
cp /opt/rackula/config/nginx.conf /etc/nginx/sites-available/rackula
cp /opt/rackula/config/security-headers.conf /etc/nginx/snippets/security-headers.conf
cp /opt/rackula/config/rackula-api.service /etc/systemd/system/rackula-api.service
if grep -q '^User=' /etc/systemd/system/rackula-api.service; then
sed -i 's/^User=.*/User=root/' /etc/systemd/system/rackula-api.service
else
sed -i '/^\[Service\]/a User=root' /etc/systemd/system/rackula-api.service
fi
if grep -q '^Group=' /etc/systemd/system/rackula-api.service; then
sed -i 's/^Group=.*/Group=root/' /etc/systemd/system/rackula-api.service
else
sed -i '/^\[Service\]/a Group=root' /etc/systemd/system/rackula-api.service
fi
mkdir -p /etc/systemd/system/nginx.service.d
cp /opt/rackula/config/nginx.service.d-override.conf /etc/systemd/system/nginx.service.d/override.conf
chown -R root:root /opt/rackula/frontend
find /opt/rackula/frontend -type d -exec chmod 755 {} \;
find /opt/rackula/frontend -type f -exec chmod 644 {} \;
chmod 750 /opt/rackula/data
msg_ok "Updated Configuration"
msg_info "Starting Services"
$STD nginx -t
systemctl daemon-reload
systemctl start nginx rackula-api
msg_ok "Started Services"
msg_ok "Updated successfully!"
fi
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"