Data directory

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
cxhamilton
Posts: 6
Joined: 13 Jun 2014, 21:00

Data directory

Post by cxhamilton » 31 Jul 2017, 18:53

I am working on a "full" featured NZBGet pp-script for FileBot + AMC and I am running into an issue with permissions as it relates to the data directory. Is this directory supposed to be per-user, created in $HOME? Is there (or can there be) a CLI option to specify an alternate location for the directory to be created and updated? e.g. --data /path/to/data/directory

User avatar
rednoah
The Source
Posts: 16096
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Data directory

Post by rednoah » 01 Aug 2017, 05:29

This would probably due the trick:

Code: Select all

export HOME=/some/other/folder
filebot -script fn:sysinfo
That's because java will use $HOME to initialize various default values. If you can't set $HOME then you could still set the appropriate Java Properties directly via the $JAVA_OPTS environment variable.
:idea: Please read the FAQ and How to Request Help.

cxhamilton
Posts: 6
Joined: 13 Jun 2014, 21:00

Re: Data directory

Post by cxhamilton » 04 Aug 2017, 13:58

That will work, but I would request that it be considered as a CLI parameter. Thanks for making an awesome app! :-)

User avatar
rednoah
The Source
Posts: 16096
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Data directory

Post by rednoah » 04 Aug 2017, 14:18

I don't really see the benefit of a custom FileBot-specific option that works only for FileBot, if there's already the $HOME environment variable which works for all applications and the -Duser.dir Java System Property which works for all Java applications.
:idea: Please read the FAQ and How to Request Help.

cxhamilton
Posts: 6
Joined: 13 Jun 2014, 21:00

Re: Data directory

Post by cxhamilton » 04 Aug 2017, 15:53

Understood, but $HOME is used by more than just FileBot. If you were scripting use of FileBot with other apps that rely on $HOME and changed $HOME for FileBot, you could negatively affect how the other apps work. It was just a suggestion. I will modify filebot.sh to use a different environment variable ($FILEBOT_HOME or something like that) to set -Duser.dir so that there is not a conflict.

evilsephiroth
Power User
Posts: 7
Joined: 27 Jul 2014, 16:21

Re: Data directory

Post by evilsephiroth » 06 Nov 2018, 17:37

Nevermind.

Setting HOME=/root fixed the issue and filebot is reading from the correct directory containing license information :D

Post Reply