2025-11-02 23:49:54 -08:00
|
|
|
#!/usr/bin/env bash
|
2026-09-02 13:37:36 +02:00
|
|
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
|
|
|
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
|
|
|
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
2026-01-06 13:28:12 +01:00
|
|
|
# Copyright (c) 2021-2026 community-scripts ORG
|
2026-03-09 09:05:14 +01:00
|
|
|
# Author: vhsdream | MickLesk (CanbiZ)
|
2025-04-22 19:48:13 +02:00
|
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
2026-08-11 21:39:56 +02:00
|
|
|
# Source: https://rxresu.me/ | Github: https://github.com/amruthpillai/reactive-resume
|
2025-04-22 19:48:13 +02:00
|
|
|
|
|
|
|
|
APP="Reactive-Resume"
|
|
|
|
|
var_tags="${var_tags:-documents}"
|
|
|
|
|
var_cpu="${var_cpu:-2}"
|
2025-08-11 07:23:29 -04:00
|
|
|
var_ram="${var_ram:-4096}"
|
2025-04-22 19:48:13 +02:00
|
|
|
var_disk="${var_disk:-8}"
|
|
|
|
|
var_os="${var_os:-debian}"
|
2025-10-15 22:58:08 +02:00
|
|
|
var_version="${var_version:-13}"
|
2026-05-23 07:46:44 +10:00
|
|
|
var_arm64="${var_arm64:-no}"
|
2025-04-22 19:48:13 +02:00
|
|
|
var_unprivileged="${var_unprivileged:-1}"
|
|
|
|
|
|
|
|
|
|
header_info "$APP"
|
|
|
|
|
variables
|
|
|
|
|
color
|
|
|
|
|
catch_errors
|
|
|
|
|
|
|
|
|
|
function update_script() {
|
2025-07-17 11:32:25 -04:00
|
|
|
header_info
|
|
|
|
|
check_container_storage
|
|
|
|
|
check_container_resources
|
2025-04-22 19:48:13 +02:00
|
|
|
|
2026-03-09 09:05:14 +01:00
|
|
|
if [[ ! -f /etc/systemd/system/reactive-resume.service ]]; then
|
2025-07-17 11:32:25 -04:00
|
|
|
msg_error "No $APP Installation Found!"
|
|
|
|
|
exit
|
|
|
|
|
fi
|
2026-03-09 09:05:14 +01:00
|
|
|
if check_for_gh_release "reactive-resume" "amruthpillai/reactive-resume"; then
|
2025-07-17 11:32:25 -04:00
|
|
|
msg_info "Stopping services"
|
2026-03-09 09:05:14 +01:00
|
|
|
systemctl stop reactive-resume
|
2025-07-17 11:32:25 -04:00
|
|
|
msg_ok "Stopped services"
|
2025-04-22 19:48:13 +02:00
|
|
|
|
2026-03-20 21:47:40 +01:00
|
|
|
ensure_dependencies git
|
|
|
|
|
|
2026-07-21 12:52:51 +02:00
|
|
|
create_backup /opt/reactive-resume/.env
|
2026-06-21 22:24:10 +02:00
|
|
|
NODE_VERSION="24" NODE_MODULE="corepack" setup_nodejs
|
2026-03-09 09:05:14 +01:00
|
|
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "reactive-resume" "amruthpillai/reactive-resume" "tarball" "latest" "/opt/reactive-resume"
|
2025-08-11 07:23:29 -04:00
|
|
|
|
2026-07-21 12:52:51 +02:00
|
|
|
restore_backup
|
|
|
|
|
|
2026-03-09 09:05:14 +01:00
|
|
|
msg_info "Updating Reactive Resume (Patience)"
|
|
|
|
|
cd /opt/reactive-resume
|
2026-03-19 21:18:10 +01:00
|
|
|
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
|
|
|
|
corepack prepare --activate
|
2025-07-17 11:32:25 -04:00
|
|
|
export CI="true"
|
|
|
|
|
export NODE_ENV="production"
|
|
|
|
|
$STD pnpm install --frozen-lockfile
|
|
|
|
|
$STD pnpm run build
|
2026-03-09 09:05:14 +01:00
|
|
|
msg_ok "Updated Reactive Resume"
|
2025-04-22 19:48:13 +02:00
|
|
|
|
2026-05-19 08:49:54 +02:00
|
|
|
msg_info "Updating Service"
|
2026-09-07 12:52:04 +02:00
|
|
|
sed -i -E 's|^WorkingDirectory=/opt/reactive-resume(/.*)?$|WorkingDirectory=/opt/reactive-resume/apps/server|; s|ExecStart=/usr/bin/node .output/server/index.mjs|ExecStart=/usr/bin/node dist/index.mjs|' /etc/systemd/system/reactive-resume.service
|
2026-05-19 08:49:54 +02:00
|
|
|
systemctl daemon-reload
|
|
|
|
|
msg_ok "Updated Service"
|
|
|
|
|
|
2025-07-17 11:32:25 -04:00
|
|
|
msg_info "Restarting services"
|
2026-03-09 09:05:14 +01:00
|
|
|
systemctl start chromium-printer reactive-resume
|
2025-07-17 11:32:25 -04:00
|
|
|
msg_ok "Restarted services"
|
2025-10-30 09:24:16 -07:00
|
|
|
msg_ok "Updated successfully!"
|
2025-07-17 11:32:25 -04:00
|
|
|
fi
|
|
|
|
|
exit
|
2025-04-22 19:48:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
start
|
|
|
|
|
build_container
|
|
|
|
|
description
|
|
|
|
|
|
2026-01-06 22:57:40 +01:00
|
|
|
msg_ok "Completed successfully!\n"
|
2025-04-22 19:48:13 +02:00
|
|
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
2026-06-03 11:03:13 +02:00
|
|
|
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
|
|
|
|
|
echo -e "${GATEWAY}${BGN}http://${IP}:3000${CL}"
|