assign_category.py
assign_category.py
docker-compose-qbittorrent.yml
docker-compose-qbittorrent.yml
extra_packages.sh
extra_packages.sh
This script goes in the `/custom_script` volume folder for **qbittorrent** container. It will install three programs.- python3: This is the dependant programming language needed.
- pip3: Package install for python.
- qbittorrent-api: Client API used to interact with qbittorrent over web or CLI.
linuxserver.io uses Alpine OS to build all images. Alpine OS is a lighter version of linux compared to Linux Mint or Ubuntu. Because of this qbittorrent-api is not in the main repo for the OS. As of writing this doc its only edge branch repo. When this script is in the /custom_script folder is will get executed every time qbittorrent container is started ensuring that it will always be ready when qbittorrent is running.
The first part of the script links to the edge repo so we can download and install it.
# Add the "edge" testing repository
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
This will check for updates to the Alpine repo
# Update the package list
apk update
This will install Python3 first then install a version of pip3 for Alpine called py3-pip
# Install Python and pip
apk add python3 py3-pip
The last part of the script will install Alpines version of qbittorrent-api
# Install qbittorrent-api
apk add py3-qbittorrent-api
📝 Note: Everything withechowill be printed out to the logs and the terminal. This way if for whatever reason the script is not working you can search the logs to troubleshoot the issue.