Skip to content

Commit

Permalink
Add Recyclarr LXC
Browse files Browse the repository at this point in the history
  • Loading branch information
MrYadro committed Nov 15, 2024
1 parent a11755d commit 509ae54
Show file tree
Hide file tree
Showing 3 changed files with 171 additions and 0 deletions.
84 changes: 84 additions & 0 deletions ct/recyclarr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2024 tteck
# Author: tteck
# Co-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 "Stopping ${APP} LXC"
systemctl stop recyclarr.service
msg_ok "Stopped ${APP} LXC"

msg_info "Updating ${APP} LXC"
rm -rf /usr/local/bin/*
wget -q $(curl -s https://api.github.com/repos/recyclarr/recyclarr/releases/latest | grep download | grep linux-musl-x64 | cut -d\" -f4)
tar -C /usr/local/bin -xJf recyclarr*.tar.xz
rm -rf recyclarr*.tar.xz
msg_ok "Updated ${APP} LXC"

msg_info "Starting ${APP} LXC"
systemctl start recyclarr.service
msg_ok "Started ${APP} LXC"
msg_ok "Updated Successfully"
exit
}

start
build_container
description

msg_ok "Completed Successfully!\n"
echo -e "Finish installation of ${APP} by editing /root/.config/recyclarr/recylcarr.yml
${BL}https://recyclarr.dev/wiki/getting-started/${CL} \n"
53 changes: 53 additions & 0 deletions install/recyclarr-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/usr/bin/env bash

# Copyright (c) 2021-2024 tteck
# Author: tteck
# Co-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
rm -rf recyclarr*.tar.gz
mkdir -p /root/.config/recyclarr
recyclarr config create
msg_ok "Installed Recyclarr"

msg_info "Creating Service"
service_path="/etc/systemd/system/recyclarr.service"
echo "[Unit]
Description=recyclarr service
After=syslog.target network-online.target
[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/local/bin/recyclarr --config=/root/.config/recyclarr/
[Install]
WantedBy=multi-user.target" >$service_path
systemctl enable --now -q recyclarr.service
msg_ok "Created Service"

motd_ssh
customize

msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"
34 changes: 34 additions & 0 deletions json/recyclarr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "Recyclarr",
"slug": "recyclarr",
"categories": [
16
],
"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 a command-line application that will automatically synchronize recommended settings from the TRaSH guides to your Sonarr/Radarr instances.",
"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": []
}

0 comments on commit 509ae54

Please sign in to comment.