From cb80b564264a09005e52acd248e1c539150579ab Mon Sep 17 00:00:00 2001 From: MickLesk Date: Wed, 20 May 2026 14:44:24 +0200 Subject: [PATCH] profilarr test --- ct/profilarr.sh | 112 +++++++++++++++++++++++++++++++++ install/profilarr-install.sh | 116 +++++++++++++++++++++++++++++++++++ 2 files changed, 228 insertions(+) create mode 100644 ct/profilarr.sh create mode 100644 install/profilarr-install.sh diff --git a/ct/profilarr.sh b/ct/profilarr.sh new file mode 100644 index 00000000..f7b77c53 --- /dev/null +++ b/ct/profilarr.sh @@ -0,0 +1,112 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2026 community-scripts ORG +# Author: michelroegl-brunner +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/Dictionarry-Hub/profilarr + +APP="Profilarr" +var_tags="${var_tags:-arr;radarr;sonarr;config}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-8}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +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/profilarr ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if [[ -d /opt/profilarr/backend ]]; then + msg_error "Profilarr v1 detected!" + echo -e "\nProfilarr v2 is a complete rewrite and is NOT compatible with v1." + echo -e "There is no migration path. Please create a new LXC container for v2.\n" + exit + fi + + if check_for_gh_release "profilarr" "Dictionarry-Hub/profilarr"; then + msg_info "Stopping Service" + systemctl stop profilarr + msg_ok "Stopped Service" + + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "profilarr" "Dictionarry-Hub/profilarr" "tarball" + PROFILARR_VERSION=$(curl -fsSL "https://api.github.com/repos/Dictionarry-Hub/profilarr/releases/latest" | grep '"tag_name"' | sed 's/.*"v\([^"]*\)".*/\1/') + + msg_info "Building Profilarr v${PROFILARR_VERSION} (Patience)" + cd /opt/profilarr + ARCH=$(uname -m) + cat >src/lib/shared/build.ts <src/lib/shared/build.ts </etc/systemd/system/profilarr.service +[Unit] +Description=Profilarr - Configuration Management for Radarr/Sonarr +After=network.target + +[Service] +Type=simple +WorkingDirectory=/opt/profilarr/app +Environment="PORT=6868" +Environment="HOST=0.0.0.0" +Environment="APP_BASE_PATH=/var/lib/profilarr" +Environment="DENO_SQLITE_PATH=${SQLITE_PATH}" +ExecStart=/opt/profilarr/app/profilarr +Restart=always +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now profilarr +msg_ok "Created Service" + +motd_ssh +customize +cleanup_lxc