From 163cc736e701b1da7d8fd4ec71f8c4359553ed02 Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Sat, 16 Nov 2024 11:44:24 +0300 Subject: [PATCH] Add Recyclarr LXC (#271) * Add Recyclarr LXC * Review fixes * Review fixes * Review fixes * Review fixes --- ct/recyclarr.sh | 73 ++++++++++++++++++++++++++++++++++++ install/recyclarr-install.sh | 37 ++++++++++++++++++ json/recyclarr.json | 34 +++++++++++++++++ 3 files changed, 144 insertions(+) create mode 100644 ct/recyclarr.sh create mode 100644 install/recyclarr-install.sh create mode 100644 json/recyclarr.json diff --git a/ct/recyclarr.sh b/ct/recyclarr.sh new file mode 100644 index 00000000..b17c10ed --- /dev/null +++ b/ct/recyclarr.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2024 community-scripts ORG +# Author: MrYadro +# License: MIT +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ __ + / __ \___ _______ _______/ /___ ___________ + / /_/ / _ \/ ___/ / / / ___/ / __ `/ ___/ ___/ + / _, _/ __/ /__/ /_/ / /__/ / /_/ / / / / +/_/ |_|\___/\___/\__, /\___/_/\__,_/_/ /_/ + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="Recyclarr" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /root/.config/recyclarr/recyclarr.yml ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + +msg_info "Updating ${APP}" +wget -q $(curl -s https://api.github.com/repos/recyclarr/recyclarr/releases/latest | grep download | grep linux-x64 | cut -d\" -f4) +tar -C /usr/local/bin -xJf recyclarr*.tar.xz +rm -rf recyclarr*.tar.xz +msg_ok "Updated ${APP}" + +msg_ok "Updated Successfully" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/install/recyclarr-install.sh b/install/recyclarr-install.sh new file mode 100644 index 00000000..404298e0 --- /dev/null +++ b/install/recyclarr-install.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 community-scripts ORG +# Author: MrYadro +# License: MIT +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y git +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Recyclarr" +wget -q $(curl -s https://api.github.com/repos/recyclarr/recyclarr/releases/latest | grep download | grep linux-x64 | cut -d\" -f4) +tar -C /usr/local/bin -xJf recyclarr*.tar.xz +mkdir -p /root/.config/recyclarr +recyclarr config create +msg_ok "Installed Recyclarr" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf recyclarr*.tar.xz +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/json/recyclarr.json b/json/recyclarr.json new file mode 100644 index 00000000..59f7fb9c --- /dev/null +++ b/json/recyclarr.json @@ -0,0 +1,34 @@ +{ + "name": "Recyclarr", + "slug": "recyclarr", + "categories": [ + 12 + ], + "date_created": "2024-11-15", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": null, + "documentation": null, + "website": "https://recyclarr.dev/", + "logo": "https://recyclarr.dev/img/recyclarr.png", + "description": "Recyclarr is an automation tool that integrates with media management software like Sonarr and Radarr. It helps users manage and organize their media libraries by automatically searching for and adding content from indexers, based on user-defined criteria. It streamlines the process of maintaining and updating media collections without manual intervention.", + "install_methods": [ + { + "type": "default", + "script": "ct/recyclarr.sh", + "resources": { + "cpu": "1", + "ram": "512", + "hdd": "2", + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} \ No newline at end of file