Traktarr How To Set Up Multiple Instance Of Traktarr (Kaiser) - Cloudbox/Community GitHub Wiki
Originally by Kaiser; modified by desimaniac
< desimaniac: could also be replaced with a script that calls on different config files >
Note: You will only need this if you are running multiple instance of sonarrx or radarrx because this will point to different instances of sonarr, for example using it for animes specific sonarr or 1080remux radarr movies and we will use systemd, no cron job. Also this is assuming you have installed Traktarr (by l3uddz)
Config
-
First of all, we are going to make a copy of the
config.jsonas well. Make sure to name it something similar or easy to remember hence why naming it to something similar with thetraktarr-animes.pyin my case I have named itconfig-animes.json.cp /opt/traktarr/config.json /opt/traktarr/config-animes.jsonNote: Don't forget to edit the new
config-animes.jsonfile to add your sonarrx or radarrx api key.
Systemd Setup
-
First head over to
cd /etc/systemd/system/then we are going to make a copy of the service file for thetraktarr.serviceagain naming it something similar in my case I am going to be naming ittraktarr-animes.servicesudo cp traktarr.service traktarr-animes.service -
Then we want to make sure to edit the file and point it to the new
traktarr-animes.pysudo nano traktarr-animes.service -
Edit the
ExecStart=/usr/bin/python3 /opt/traktarr.py runtoExecStart=/usr/bin/python3 /opt/traktarr/traktarr.py --config '/opt/traktarr/config-animes.json' --logfile '/opt/traktarr/activity-animes.log' run.save the file by pressing
ctrl + oThen to exit
ctrl + x -
Enable and start the service
sudo systemctl daemon-reload sudo systemctl enable traktarr-animes.service sudo systemctl start traktarr-animes.service
Shortcut
Lastly we are going to make a shortcut called 'traktarr-animes' so that we can access it anywhere just like traktarr shows arg arg.
-
Create the following file in '/usr/local/bin/traktarr-animes' .. `sudo nano /usr/local/bin/traktarr-animes'..
#!/bin/bash CONFIGFILE='config-animes.json' LOGFILE='activity-animes.log' /usr/bin/python3 /opt/traktarr/traktarr.py --config "/opt/traktarr/$CONFIGFILE" --logfile "/opt/traktarr/$LOGFILE" "$@"save the file by pressing
ctrl + oThen to exit
ctrl + x -
Then
sudo chmod +x /usr/local/bin/traktarr-animes -
If you have done everything correctly then you should be able to do
traktarr-animesand get an output :