This script automates the process of updating Sonarr to a specified version. It stops the Sonarr service, downloads the specified version, extracts the files, copies them to the appropriate directory, restarts the service, and cleans up the downloaded files. The script also provides progress updates with color-coded messages.
- Ensure you have
wget
,tar
, andsystemctl
installed on your system. - The user running the script must have
sudo
privileges.
-
Clone the Repository:
git clone https://github.com/bekkenes/sonarr-update-script.git cd sonarr-update-script
-
Make the Scripts Executable:
chmod +x update_sonarr*.sh
-
Run the Script (choose your version, under is script with color and no root):
./update_sonarr_v2_non_admin.sh
-
Follow the Prompts:
- Enter the version number when prompted (e.g.,
0.8.2008
).
- Enter the version number when prompted (e.g.,
The script performs the following steps:
- Stops the Sonarr service.
- Prompts the user to input the version number.
- Downloads the specified version of Sonarr.
- Extracts the downloaded file.
- Copies the extracted files to the Sonarr directory.
- Restarts the Sonarr service.
- Waits for 3 seconds.
- Cleans up the downloaded and extracted files.
- In Progress: Yellow
- Success: Green
- Failed: Red
In progress: Stopping the Sonarr service
Success: Sonarr service stopped
In progress: Downloading Sonarr version 4.0.8.2008
Success: Downloaded Sonarr version 4.0.8.2008
In progress: Extracting Sonarr.develop.4.0.8.2008.linux-x64.tar.gz
Success: Extracted Sonarr.develop.4.0.8.2008.linux-x64.tar.gz
In progress: Copying files to /usr/lib/sonarr/bin
Success: Copied files to /usr/lib/sonarr/bin
In progress: Restarting the Sonarr service
Success: Sonarr service restarted
In progress: Waiting for 3 seconds
Success: Waited for 3 seconds
In progress: Cleaning up files
Success: Cleaned up files
Update completed.
This project is licensed under the MPL-2.0 license - see the LICENSE file for details.
Feel free to customize the README further to suit your needs!