Custom tmp update directory

I currently have two instances of sonarr running on my Linux server with different users. It all works perfectly, except for the update. Both try to use the /tmp/ directory to update/backup. So for obvious reasons, the first one to use it makes the permissions and blocks the other one out.

My question is, is there a way to make a custom directory for the second instance to use for this?

As it is now, I have to delete the update folder and move the backup folder to let the second one update, then repeat.

I know this is an uncommon situation, and using just one instance isn’t an option because both users delete after watching an episode, watch at different paces, and locations.

Thanks

Sonarr gets the location from the OS. You should be able to change it on a per user basis: http://superuser.com/a/332616/243275

TMPDIR This variable shall represent a pathname of a directory made available for programs that need a place to create temporary files.

First, thanks for responding. I posted this last night while I was out, and only did a quick search on here/google without finding anything similar.

This was a PITA. lol I use systemd to launch sonarr in a screen instance. It was the easiest way to have it where it could restart after auto updating. (at least when I first set it up)

Turns out both screen and systemd don’t include any of the environment variables when they run. Had me messed up for a few hours. lol

Ended up not using screen anymore, and instead use “Restart=always”, and " Environment=“TMPDIR=/path/to/tmp” " in the systemd service.

Thanks for pointing me in the right direction, it works perfectly now. :slight_smile:

@Sek0n how do you deal with the upgrades and the Nzbdrone.exe renaming.

Sonarr doesn’t allow two instances of the exe running, so i had to rename Nzbdrone to Nzbdrone2.exe, but after upgrades it goes back to Nzbdrone.exe

Sorry @subzero79 , I didn’t get the notification about your reply till now. ><

I have it running under two different users, with a different folder for each user. I didn’t need to change anything else other than the tmp directory, and they’ve been upgrading and running great since.