Save 4K and 1080p Copies - treverehrfurth/old-scripts GitHub Wiki

  1. Introduction
  2. Installation
  3. Automate at startup

1. Introduction

To keep both 1080p and 4K files of the same TV show or Movie, you will need to run two separate instances of Sonarr/Radarr. On Windows 10, you can accomplish this fairly easy as long as you are running WSL (Windows Subsystem for Linux) which this wiki also covers in the earlier steps.

2. Installation

  1. Install Sonarr/Radarr like normal as gone over in earlier sections of this Wiki.

  2. Go to Sonarr/Radarr page and install the Linux version as it says to do so.

  3. Change port number for the windows version in the settings for Sonarr/Radarr.

  4. open up https://localhost:8989 to verify it is up and working

3. Automate

  1. Create Sonarr/Radarr startup script. In Ubuntu.

    Run this script if you haven't automated MySQL and Apache2 at startup, otherwise ignore.

    mkdir -p ~/.local/bin/
    

    Now create the services...

    echo "mono --debug /opt/NzbDrone/NzbDrone.exe" >> ~/.local/bin/start_sonarr.sh
    chmod +x ~/.local/bin/start_sonarr.sh
    
    echo "mono --debug /opt/NzbDrone/NzbDrone.exe" >> ~/.local/bin/start_radarr.sh
    chmod +x ~/.local/bin/start_radarr.sh
    
  2. Make sure this is under #User privilege specification

    root     ALL=(ALL:ALL) ALL
    
  3. Make sure this is under #Members of the admin group may gain root privileges

    %admin ALL=(ALL:ALL) ALL
    
  4. Make sure this is under #Allow members of group sudo to execute any command

    %sudo ALL=(ALL:ALL) ALL
    (server_name) ALL=(ALL) NOPASSWD:ALL
    
  5. Make sure this is under #Includedir /etc/sudoers.d

    (server_name) ALL=(root) NOPASSWD: /home/(server_name)/.local/bin/start_sonarr.sh
    (server_name) ALL=(root) NOPASSWD: /home/(server_name)/.local/bin/start_radarr.sh
    

  6. Create task to start at windows login

    1. Open Task Scheduler

    2. Click Create Task...

    3. Name the task Start Sonarr

    4. Under the Triggers tab click New...

    5. In the Begin the task dropdown, select At log on

    6. Select Any user

    7. Under the Actions tab click New...

    8. Pick Start a program for the action type then enter this for the program to run

    C:\(PC_Name)\System32\bash.exe
    
    1. Finally, as the last and most important step, at Add arguments set this argument string to run the command with
    -c "sudo ~/.local/bin/start_sonarr.sh"
    
    1. Repeat for Radarr