diff --git a/.env.sample b/.env.sample index 05ddae8..dc21c97 100644 --- a/.env.sample +++ b/.env.sample @@ -22,6 +22,7 @@ LIDARR_UID=13003 READARR_UID=13004 MYLAR_UID=13005 AUDIOBOOKSHELF_UID=13014 +SPORTARR_UID=13015 BAZARR_UID=13013 PROWLARR_UID=13006 QBITTORRENT_UID=13007 diff --git a/README.md b/README.md index 21a498a..e3be596 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ Ezarr is a project built to make it EZ to deploy a Servarr mediacenter on an Ubu badge above means that the shell script and docker-compose file in this repository at least *don't crash*. It doesn't necessarily mean it will run well on your system ;) It's set up to follow the [TRaSH guidelines](https://trash-guides.info/Hardlinks/How-to-setup-for/Docker/) so it should at least perform optimally. It features: +- [Sportarr](https://github.com/Sportarr/Sportarr) is an application to manage sports events, in the + style of the Starr family. It monitors leagues and grabs, sorts, and renames broadcasts. - [Sonarr](https://sonarr.tv/) is an application to manage TV shows. It is capable of keeping track of what you'd like to watch, at what quality, in which language and more, and can find a place to download this if connected to Prowlarr and qBittorrent. It can also reorganize the media you @@ -57,7 +59,7 @@ To make things easier, a CLI has been developed. First, clone the repository in choosing. You can run it by entering `python3 main.py` and the CLI will guide you through the process. This is the recommended method if you're setting this up for the first time on a new system. Please take a look at [important notes](#important-notes) before you continue. -**NOTE: This script will create users for each container with IDs ranging from 13001 to 13014. +**NOTE: This script will create users for each container with IDs ranging from 13001 to 13015. If you want to choose your own IDs (or some of them are occupied) you have to go through the manual install.** ### Manually diff --git a/container_configs.py b/container_configs.py index 7a02dc5..3a9b181 100644 --- a/container_configs.py +++ b/container_configs.py @@ -93,6 +93,24 @@ def sonarr(self): ' restart: unless-stopped\n\n' ) + def sportarr(self): + return ( + ' sportarr:\n' + ' image: sportarr/sportarr:latest\n' + ' container_name: sportarr\n' + ' environment:\n' + ' - PUID=13015\n' + ' - PGID=13000\n' + ' - UMASK=002\n' + f' - TZ={self.timezone}\n' + ' volumes:\n' + f' - {self.config_dir}/sportarr-config:/config\n' + f' - {self.root_dir}/data:/data\n' + ' ports:\n' + ' - "1867:1867"\n' + ' restart: unless-stopped\n\n' + ) + def radarr(self): return ( ' radarr:\n' diff --git a/docker-compose.yml.sample b/docker-compose.yml.sample index 2b9496e..7d9af52 100644 --- a/docker-compose.yml.sample +++ b/docker-compose.yml.sample @@ -16,6 +16,21 @@ services: - "8989:8989" restart: unless-stopped + sportarr: + image: sportarr/sportarr:latest + container_name: sportarr + environment: + - PUID=${SPORTARR_UID} + - PGID=${MEDIACENTER_GID} + - UMASK=002 + - TZ=${TIMEZONE} + volumes: + - ${ROOT_DIR}/config/sportarr-config:/config + - ${ROOT_DIR}/data:/data + ports: + - "1867:1867" + restart: unless-stopped + radarr: image: lscr.io/linuxserver/radarr:latest container_name: radarr diff --git a/main.py b/main.py index 6c9c7ae..3ef668d 100644 --- a/main.py +++ b/main.py @@ -50,6 +50,7 @@ def main(): print('\n===SERVARR===') services_classed['servarr'] = [] take_input('sonarr', 'servarr') + take_input('sportarr', 'servarr') take_input('radarr', 'servarr') take_input('lidarr', 'servarr') take_input('mylar3', 'servarr') diff --git a/remove_old_users.sh b/remove_old_users.sh index e48436c..7bf98d5 100755 --- a/remove_old_users.sh +++ b/remove_old_users.sh @@ -6,6 +6,7 @@ sudo docker compose down # Remove old users and group sudo userdel sonarr +sudo userdel sportarr sudo userdel radarr sudo userdel lidarr sudo userdel readarr diff --git a/setup.sh b/setup.sh index ee5e15e..0c6093e 100755 --- a/setup.sh +++ b/setup.sh @@ -21,6 +21,7 @@ sudo useradd plex -u $PLEX_UID sudo useradd sabnzbd -u $SABNZBD_UID sudo useradd bazarr -u $BAZARR_UID sudo useradd audiobookshelf -u $AUDIOBOOKSHELF_UID +sudo useradd sportarr -u $SPORTARR_UID sudo groupadd mediacenter -g $MEDIACENTER_GID # Adds current user to the mediacenter group. This is recommended so that you can still have access to files inside the ezarr folder structure for manual control. @@ -41,11 +42,12 @@ sudo usermod -a -G mediacenter plex sudo usermod -a -G mediacenter sabnzbd sudo usermod -a -G mediacenter bazarr sudo usermod -a -G mediacenter audiobookshelf +sudo usermod -a -G mediacenter sportarr # Make directories # ${ROOT_DIR:-.}/ means take the value from ROOT_DIR value, if failed or empty place it in the current folder -sudo mkdir -pv ${ROOT_DIR:-.}/config/{sonarr,radarr,lidarr,mylar,prowlarr,qbittorrent,jackett,audiobookshelf,seerr,plex,jellyfin,tautulli,sabnzbd,bazarr}-config -sudo mkdir -pv ${ROOT_DIR:-.}/data/{torrents,usenet,media}/{tv,movies,music,books,comics,audiobooks,podcasts,audiobookshelf-metadata} +sudo mkdir -pv ${ROOT_DIR:-.}/config/{sonarr,radarr,lidarr,mylar,prowlarr,qbittorrent,jackett,audiobookshelf,seerr,plex,jellyfin,tautulli,sabnzbd,bazarr,sportarr}-config +sudo mkdir -pv ${ROOT_DIR:-.}/data/{torrents,usenet,media}/{tv,movies,music,books,comics,audiobooks,podcasts,audiobookshelf-metadata,sports} # Set permissions sudo chmod -R 775 ${ROOT_DIR:-.}/data/ @@ -69,5 +71,6 @@ sudo chown -R $UID:mediacenter ${ROOT_DIR:-.}/config/tautulli-config sudo chown -R sabnzbd:mediacenter ${ROOT_DIR:-.}/config/sabnzbd-config sudo chown -R bazarr:mediacenter ${ROOT_DIR:-.}/config/bazarr-config sudo chown -R audiobookshelf:mediacenter ${ROOT_DIR:-.}/config/audiobookshelf-config +sudo chown -R sportarr:mediacenter ${ROOT_DIR:-.}/config/sportarr-config echo "Done! It is recommended to reboot now." diff --git a/users_groups_setup.py b/users_groups_setup.py index 88545f6..211e2c7 100644 --- a/users_groups_setup.py +++ b/users_groups_setup.py @@ -28,6 +28,15 @@ def sonarr(self): self.create_config_dir('sonarr') os.system('sudo usermod -a -G mediacenter sonarr') + def sportarr(self): + os.system( + '/bin/bash -c "sudo useradd sportarr -u 13015' + ' ; sudo mkdir -pv ' + self.root_dir + '/data/{media,usenet,torrents}/sports -m 775' + ' ; sudo chown -R sportarr:mediacenter ' + self.root_dir + '/data/{media,usenet,torrents}/sports"' + ) + self.create_config_dir('sportarr') + os.system('sudo usermod -a -G mediacenter sportarr') + def radarr(self): os.system( '/bin/bash -c "sudo useradd radarr -u 13002'