Auto Upload for Sonarr and Lidarr
📂 Click Here - Sign up for Google's Suite for Business - Unlimited Space
📂 Click Here - NZB's with from NewsHost - PG Members Receive a 58% Discount
Table of Contents
THIS IS NOT NEEDED or USED BY PGBLITZ!
Use at your own risk, it's possible you can do things that will conflict and cause problems with PGBLITZ operations and operating behaviors.
1. Intro to Automation, welcome to 2019 bois
The script is pretty simple to use. Just edit the "NAMEOFSCRIPTHERE.sh" with whatever you want to name the script and "RCLONE COMMAND HERE" with the command you want to use for rclone.
Features of this simple 5 line script
- Checks if it's already running so it doesn't run over itself.
- Basically any rclone command can be put into here.
- Can be added to Sonarr/Lidarr to have it run after it imports an item. (Auto upload after completion)
Some things to note
- Your rclone needs to be callable normally. IE, You type
rclone copy...if you get an error do
which rcloneand add that with your command instead of only rclone so you end up with
- Name of script needs to match the name you give in the script as that looks for itself in the processes to check if theres a job already running.
- Script needs to be
chmod +xso Sonarr/Lidarr can run it. AFAIK anything that can run a script will be able to run this script. Only tested with Sonarr/Lidarr.
2. The Script
#!/bin/bash if pidof -o %PPID -x "NAMEOFSCRIPTHERE.sh"; then exit 1 fi RCLONE COMMAND HERE exit
3. Connect to Sonarr
- Visit Sonarr page
- Go to Settings>Connect>Custom Script.
- Configure it similar to the screenshot below.
If you have rename, toggle "On Rename". Same applies if you have upgrades for files.