Creating rc script for Jackett

Status
Not open for further replies.
Joined
Mar 7, 2016
Messages
6
I want to run Jackett alongside Sonarr, so in the Sonarr jail I've install mono and Jacket by doing:

pkg update && pkg upgrade -y
pkg install lang/mono
pkg install ftp/curl
wget https://github.com/Jackett/Jackett/releases/download/v0.7.363/Jackett.Binaries.Mono.tar.gz
tar xzf Jackett.Binaries.Mono.tar.gz
mv Jackett /usr/local/bin
rm Jackett.Binaries.Mono.tar.gz


Then when I cd /usr/local/bin/Jackett/ and run mono JackettConsole.exe it actually works! Hurray!

Naturally, I want to run Jackett as a daemon. I've got experience with init.d scripts and upstart, but not FreeBSD's rc scripting. I'm attempting to create a script using this guide and a previous discussion, but I haven't managed. Here's what I have so far:

To /etc/rc.conf I add some lines defining from where I want to run to process and maybe even where it stores its data:
jackett_enable="YES"
jackett_data_dir="/var/db/jackett"
jackett_user="media"
jackett_chroot="/usr/local/bin/Jackett"


I'm trying to keep /usr/local/etc/rc.d/jackett (the actual script that starts the process) as clean as possible:
#!/bin/sh

. /etc/rc.subr

name=jackett
rcvar=jackett_enable

command="/usr/local/bin/mono-sgen"
command_args="JackettConsole.exe"

pidfile="/var/run/${name}.pid"

load_rc_config $name
run_rc_command "$1"


Now when I run service jackett start I get:
/usr/local/etc/rc.d/jackett: WARNING: run_rc_command: cannot run /usr/local/bin/mono-sgen

I tried a bunch of things, like removing jackett_user="media" so that it would run as root and chaning command="/usr/local/bin/mono" to command="/usr/local/bin/mono-sgen", but I'm not sure why this script can't run. Does anybody know what I'm doing wrong?
 
Joined
Mar 7, 2016
Messages
6
Continuing my pursuit to starting Jackett as a daemon I've found the following:
- mono is actually already in the Sonarr jail. It's used in /usr/local/etc/rc.d/sonarr. So you don't need to install the package if you want to run Jackett in the Sonarr jail, like I do.
- The problem was that I used the ${name}_chroot directive. As its name implies, it doesn't just change the directory, but it denies access to superdirectories.
 
Last edited:

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
EDIT
Nevermind, you already used the previous thread =]

So is this working for you now?
 
Joined
Mar 7, 2016
Messages
6
EDIT
Nevermind, you already used the previous thread =]

So is this working for you now?
Yes and no. I did manage to start Jackett as a daemon, but then it isn't able to write any data when I configure it. I guess it tries to write a file to a directory that it doesn't have write permissions. When I simply start it command line it works, so now I did that the butt-ugly way: /opt/Jackett # nohup mono JackettConsole.exe > /var/db/jackett/jackett.log

Also, the rc script doesn't write a pid file, so when I do service jackett start and then service jackett status it says jackett is not running. I thought that by setting pidfile="/var/db/jackett/nzbdrone.pid" in /usr/local/etc/rc.d/jackett the pid would be recorded (btw, /var/db/jackett does exist and is writable by the media user).

I'm not happy with the nohup method. I'd prefer to have an rc script that starts a Jackett daemon that's able to write its config data. Maybe I can fix it by changing the working directory in the rc script. Any tips on how to do that?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Your problems sound pretty simple to solve to me. When I have time, possibly tonight, I can help fix up the script for you.

I'm assuming the script changes the user to a non-root user, which needs permissions to whatever folders jackett needs to write to?
Also the pidfile issue shouldn't be too difficult to solve. Does jacket nwrite its own pidfile? If not, it isn't necessary, the FreeBSD rc system know how to parse the running processes based on the "command" directive and user to know if the service is already running.
 
Joined
Mar 7, 2016
Messages
6
I definitely made some progress yesterday. I found that mono and Jackett store their data in the user's homedir by default. In this case I was running it as root and it was storing files in /root/.config/.mono and /root/.config/Jackett.

We can set the directory that Jackett stores its files with the -d flag. That makes my /usr/local/etc/rc.d/jackett file look like this:

#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: jackett
# REQUIRE: LOGIN
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable jackett:
# jackett_enable="YES"
# jackett_user="media"

. /etc/rc.subr

name="jackett"
rcvar=jackett_enable

load_rc_config $name

pidfile="/var/run/jackett.pid"
command="/usr/sbin/daemon"
command_args="-f /usr/local/bin/mono /opt/Jackett/JackettConsole.exe -d /var/db/jackett/"

run_rc_command "$1"


The problem that mono needs to write a keypair remains. I haven't found how to configure that. Mono stores its data to /.config/.mono/ and I've simply made that directory writable by the media user.

What doesn't work yet is the writing of the pid file. As shown above I've set the pidfile variable in the service file. However, this file isn't written to by the rc daemon. Below is some terminal output of starting the Jackett daemon, but when I check the status or try to stop it, the rc daemon doesn't know it's running. Of course, when I list the running processes it is running.

To see if the media user tries to write the pid file, I've also made it writable by the media user.


root@sonarr_1:/ # service jackett start
Starting jackett.
root@sonarr_1:/ # service jackett status
jackett is not running.
root@sonarr_1:/ # service jackett stop
jackett not running? (check /var/run/jackett.pid).
root@sonarr_1:/ # ls /var/run/jackett.pid
ls: /var/run/jackett.pid: No such file or directory
root@sonarr_1:/ # ps aux | grep Jack | grep -v grep
media 74876 0.0 0.2 168360 59144 ?? SsJ 12:57PM 0:00.84 /usr/local/bin/mono /opt/Jackett/JackettConsole.exe -d /var/db/jackett/ (mono-sgen)
root@sonarr_1:/ #
root@sonarr_1:/ #
root@sonarr_1:/ # kill 74876
root@sonarr_1:/ #
root@sonarr_1:/ #
root@sonarr_1:/ # touch /var/run/jackett.pid; chown media /var/run/jackett.pid
root@sonarr_1:/ # ll /var/run/jackett.pid
-rw-r--r-- 1 media wheel 0 Sep 7 12:58 /var/run/jackett.pid
root@sonarr_1:/ # service jackett start
Starting jackett.
root@sonarr_1:/ # service jackett stop
jackett not running? (check /var/run/jackett.pid).
root@sonarr_1:/ # cat /var/run/jackett.pid
root@sonarr_1:/ # ll /var/run/jackett.pid
-rw-r--r-- 1 media wheel 0 Sep 7 12:58 /var/run/jackett.pid
root@sonarr_1:/ # ps aux | grep Jack | grep -v grep
media 74929 9.9 0.2 209228 82308 ?? SsJ 12:58PM 0:01.20 /usr/local/bin/mono /opt/Jackett/JackettConsole.exe -d /var/db/jackett/ (mono-sgen)
root@sonarr_1:/ #


So, there are 2 things that I want to improve:
- The pid file
- The directory mono writes to

For the rest, I'm happy to say that Jackett works! It's been doing its thing the last couple of days.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Nice, looks like you got it 95% there!

I've solved the mono cert problem before for the sonarr port, hopefully the same fix works.
Try setting the XDG_CONFIG_HOME variable, see here..
https://github.com/freebsd/freebsd-ports/blob/master/net-p2p/sonarr/files/sonarr.in#L34

As for the pidfile issue, are you expecting the rc.d system to do this for you? Are you sure jacket writes it's own pidfile, from looking at startup scripts for ubuntu it looks like they are managing this with their init system.
In that case I suggest you don't define the pidfile variable and instead define the procname.

Code:
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: jackett
# REQUIRE: LOGIN
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable jackett:
# jackett_enable="YES"

. /etc/rc.subr

name="jackett"
rcvar=jackett_enable

load_rc_config $name

: ${jackett_enable="NO"}
: ${jackett_user:="media"}
: ${jackett_data_dir:="/var/db/jackett"}

procname="/usr/local/bin/mono"
command="/usr/sbin/daemon"
command_args="-f ${procname} /opt/Jackett/JackettConsole.exe -d ${jackett_data_dir}"

start_precmd="export XDG_CONFIG_HOME=${jackett_data_dir}"


run_rc_command "$1"
 
Joined
Mar 7, 2016
Messages
6
Nice, looks like you got it 95% there!

I've solved the mono cert problem before for the sonarr port, hopefully the same fix works.
Try setting the XDG_CONFIG_HOME variable, see here..
https://github.com/freebsd/freebsd-ports/blob/master/net-p2p/sonarr/files/sonarr.in#L34

As for the pidfile issue, are you expecting the rc.d system to do this for you? Are you sure jacket writes it's own pidfile, from looking at startup scripts for ubuntu it looks like they are managing this with their init system.
In that case I suggest you don't define the pidfile variable and instead define the procname.

Code:
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: jackett
# REQUIRE: LOGIN
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable jackett:
# jackett_enable="YES"

. /etc/rc.subr

name="jackett"
rcvar=jackett_enable

load_rc_config $name

: ${jackett_enable="NO"}
: ${jackett_user:="media"}
: ${jackett_data_dir:="/var/db/jackett"}

procname="/usr/local/bin/mono"
command="/usr/sbin/daemon"
command_args="-f ${procname} /opt/Jackett/JackettConsole.exe -d ${jackett_data_dir}"

start_precmd="export XDG_CONFIG_HOME=${jackett_data_dir}"


run_rc_command "$1"

Brilliant mate!

Setting XDG_CONFIG_HOME does exactly that: it defines where mono writes the keypair.

Defining procname makes the rc daemon take care of writing the pid file and is thus able to kill the daemon correctly.
root@sonarr_1:/ # service jackett stop
Stopping jackett.
Waiting for PIDS: 62683, 62683.


We've got a working service!
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
nice =]
 

Musabi

Cadet
Joined
Feb 8, 2017
Messages
7
Hi guys!

I know I'm responding to an old thread but I don't know where to turn to next. I have installed Jackett in it's own Jail, so a bit different from Balthasar in that respect.

I followed what Balthasar did pretty much to a tee but I am still stuck. First I installed what I should have:

pkg update && pkg upgrade -y
pkg install lang/mono
pkg install ftp/curl
pkg install wget
wget https://github.com/Jackett/Jackett/releases/download/v0.7.363/Jackett.Binaries.Mono.tar.gz
tar xzf Jackett.Binaries.Mono.tar.gz
mv Jackett /usr/local/bin
rm Jackett.Binaries.Mono.tar.gz


I changed /etc/rc.conf to include jackett_enable="YES"

And this is the code that I have for jackett in /etc/rc.d/
Code:
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: jackett
# REQUIRE: LOGIN
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable jackett:
# jackett_enable="YES"

. /etc/rc.subr

name="jackett"
rcvar=jackett_enable

load_rc_config $name

: ${jackett_enable="NO"}
: ${jackett_user:="root"}
: ${jackett_data_dir:="/var/db/jackett"}

procname="/usr/local/bin/mono"
command="/usr/sbin/daemon"
command_args="-f ${procname} /opt/Jackett/JackettConsole.exe -d ${jackett_data_dir}"

start_precmd="export XDG_CONFIG_HOME=${jackett_data_dir}"


run_rc_command "$1"

As you can see I changed : ${jackett_user:="media"} to : ${jackett_user:="root"} as media was not working and I am pretty sure it is a permissions problem.

This is what I get when I try to start the service and I'm just showing you that the root user has permission to execute the jackett file.


root@Jackett:/ # service jackett start
Starting jackett.
root@Jackett:/ # service jackett status
jackett is not running.
root@Jackett:/ # cd etc/rc.d
root@Jackett:/etc/rc.d # ls -l jackett
-rwxrwxrwx 1 root wheel 560 Apr 3 21:56 jackett
root@Jackett:/etc/rc.d #


Any help would be greatly appreciated!! :)

Also, please be gentle - this is my first foray into anything Linux based :oops:
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hi guys!

I know I'm responding to an old thread but I don't know where to turn to next. I have installed Jackett in it's own Jail, so a bit different from Balthasar in that respect.

I followed what Balthasar did pretty much to a tee but I am still stuck. First I installed what I should have:

pkg update && pkg upgrade -y
pkg install lang/mono
pkg install ftp/curl
pkg install wget
wget https://github.com/Jackett/Jackett/releases/download/v0.7.363/Jackett.Binaries.Mono.tar.gz
tar xzf Jackett.Binaries.Mono.tar.gz
mv Jackett /usr/local/bin
rm Jackett.Binaries.Mono.tar.gz


I changed /etc/rc.conf to include jackett_enable="YES"

And this is the code that I have for jackett in /etc/rc.d/
Code:
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: jackett
# REQUIRE: LOGIN
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable jackett:
# jackett_enable="YES"

. /etc/rc.subr

name="jackett"
rcvar=jackett_enable

load_rc_config $name

: ${jackett_enable="NO"}
: ${jackett_user:="root"}
: ${jackett_data_dir:="/var/db/jackett"}

procname="/usr/local/bin/mono"
command="/usr/sbin/daemon"
command_args="-f ${procname} /opt/Jackett/JackettConsole.exe -d ${jackett_data_dir}"

start_precmd="export XDG_CONFIG_HOME=${jackett_data_dir}"


run_rc_command "$1"

As you can see I changed : ${jackett_user:="media"} to : ${jackett_user:="root"} as media was not working and I am pretty sure it is a permissions problem.

This is what I get when I try to start the service and I'm just showing you that the root user has permission to execute the jackett file.


root@Jackett:/ # service jackett start
Starting jackett.
root@Jackett:/ # service jackett status
jackett is not running.
root@Jackett:/ # cd etc/rc.d
root@Jackett:/etc/rc.d # ls -l jackett
-rwxrwxrwx 1 root wheel 560 Apr 3 21:56 jackett
root@Jackett:/etc/rc.d #


Any help would be greatly appreciated!! :)

Also, please be gentle - this is my first foray into anything Linux based :oops:
@Musabi It looks like you got pretty close to getting it working!

Here's a few issues I see, and also some minor suggestions
* you install 'wget', this really isn't needed, just use 'fetch' to download the binary
* you put the jackett files in /usr/local/bin while the rc.d script you use expects the Jackett files to be in /opt. personally, I think these should be somewhere like /usr/local/share/Jackett
* you could just run 'sysrc jackett_enable=YES' to avoid manually editting /etc/rc.conf
* you should not put user created rc.d scripts in /etc/rc.d, these should be in /usr/local/etc/rc.d
* running as media user could not be working because of permissions (the user running should own /var/db/jackett). But I assume in your case, you never created the media user in your jail
* a jail on FreeNAS is not "linux based" and uses linux in no way =P

Here's what I just tried and it worked as expected
Code:
pkg install mono curl
fetch https://github.com/Jackett/Jackett/releases/download/v0.7.363/Jackett.Binaries.Mono.tar.gz
tar xzf Jackett.Binaries.Mono.tar.gz
mv Jackett /usr/local/share
rm Jackett.Binaries.Mono.tar.gz
sysrc jackett_enable=YES


Create /usr/local/etc/rc.d/jackett
Code:
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: jackett
# REQUIRE: LOGIN
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable jackett:
# jackett_enable="YES"

. /etc/rc.subr

name="jackett"
rcvar=jackett_enable

load_rc_config $name

: ${jackett_enable="NO"}
: ${jackett_user:="root"}
: ${jackett_data_dir:="/var/db/jackett"}

procname="/usr/local/bin/mono"
command="/usr/sbin/daemon"
command_args="-f ${procname} /usr/local/share/Jackett/JackettConsole.exe -d ${jackett_data_dir}"

start_precmd="export XDG_CONFIG_HOME=${jackett_data_dir}"

run_rc_command "$1"


Code:
chmod +x /usr/local/etc/rc.d/jackett
service jackett strart
 

Musabi

Cadet
Joined
Feb 8, 2017
Messages
7
@Musabi It looks like you got pretty close to getting it working!

Here's a few issues I see, and also some minor suggestions
* you install 'wget', this really isn't needed, just use 'fetch' to download the binary
* you put the jackett files in /usr/local/bin while the rc.d script you use expects the Jackett files to be in /opt. personally, I think these should be somewhere like /usr/local/share/Jackett
* you could just run 'sysrc jackett_enable=YES' to avoid manually editting /etc/rc.conf
* you should not put user created rc.d scripts in /etc/rc.d, these should be in /usr/local/etc/rc.d
* running as media user could not be working because of permissions (the user running should own /var/db/jackett). But I assume in your case, you never created the media user in your jail
* a jail on FreeNAS is not "linux based" and uses linux in no way =P

Here's what I just tried and it worked as expected
Code:
pkg install mono curl
fetch https://github.com/Jackett/Jackett/releases/download/v0.7.363/Jackett.Binaries.Mono.tar.gz
tar xzf Jackett.Binaries.Mono.tar.gz
mv Jackett /usr/local/share
rm Jackett.Binaries.Mono.tar.gz
sysrc jackett_enable=YES


Create /usr/local/etc/rc.d/jackett
Code:
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: jackett
# REQUIRE: LOGIN
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable jackett:
# jackett_enable="YES"

. /etc/rc.subr

name="jackett"
rcvar=jackett_enable

load_rc_config $name

: ${jackett_enable="NO"}
: ${jackett_user:="root"}
: ${jackett_data_dir:="/var/db/jackett"}

procname="/usr/local/bin/mono"
command="/usr/sbin/daemon"
command_args="-f ${procname} /usr/local/share/Jackett/JackettConsole.exe -d ${jackett_data_dir}"

start_precmd="export XDG_CONFIG_HOME=${jackett_data_dir}"

run_rc_command "$1"


Code:
chmod +x /usr/local/etc/rc.d/jackett
service jackett strart


root@Jackett:/ # service jackett start
Starting jackett.
root@Jackett:/ # service jackett status
jackett is running as pid 95219.
root@Jackett:/ #


Well would you look at that! It works! Thank you so much!!

As for where I was putting it, I was just trying the places service jackett start was telling me that it SHOULD be place in as beforehand the service wasn't running. I appreciate you setting me straight!

And I think there was some permissions issues for sure. Like I said, I'm very much a newb and didn't realize that you had to create media users in your jail even if they are created in FreeNAS itself! I will know for next time though :)

And I educated myself with 'Linux' as well, and I guess I meant I hadn't used anything 'Unix' based before (which I belive FreeBSD which FreeNAS is based on is?). If I get this wrong I'm going to look even worse though haha.

Thanks again!
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949

root@Jackett:/ # service jackett start
Starting jackett.
root@Jackett:/ # service jackett status
jackett is running as pid 95219.
root@Jackett:/ #


Well would you look at that! It works! Thank you so much!!

As for where I was putting it, I was just trying the places service jackett start was telling me that it SHOULD be place in as beforehand the service wasn't running. I appreciate you setting me straight!

And I think there was some permissions issues for sure. Like I said, I'm very much a newb and didn't realize that you had to create media users in your jail even if they are created in FreeNAS itself! I will know for next time though :)

And I educated myself with 'Linux' as well, and I guess I meant I hadn't used anything 'Unix' based before (which I belive FreeBSD which FreeNAS is based on is?). If I get this wrong I'm going to look even worse though haha.

Thanks again!
Glad it works for you.

Yeah, permissions can get a bit confusing since the jails and the host do not share user databases. So a user on the FreeNAS host does not necessarily exist in the jail. I cover this a bit in my permission thread in case you want to use a different user than 'root'.
https://forums.freenas.org/index.ph...plugins-write-permissions-to-your-data.27273/

I'm not an expert on the *NIX based genealogy either myself, lol
 

TheDrifter363

Dabbler
Joined
Apr 17, 2017
Messages
10
Sorry about bumping this thread, but I actually created a jail of my own in order for Jackett to run. I installed all the prerequisites just fine and I modeled the rc configuration after sonarr or radarr. Both of those plugins/jails are working fine. But for Jackett, I'm having a really hard time on getting it to run. I read up on these forums about what other people have gone through, but it hasn't been much luck for me. The service starts for a second and then quits itself 2 to 3 seconds later. I know because if I type in service jackett status right after service jackett start, then I see a PID number. Note, this only occurs if that pid command in the rc file is commented out or nonexistent. Regardless, it still quits itself after. Jackett's data folder has the correct permission as does the folder where I extracted the linux binary to. I'll post my rc file, see if it makes a difference. If you guys could help me out, that would be awesome. Thanks!

rc.d/jackett:
Code:
#!/bin/sh
# Author: Liriel Baenre <liriel@sekrit.me>
#  Mark Felder <feld@FreeBSD.org>
#
#
# $FreeBSD$
#

# PROVIDE: jackett
# REQUIRE: LOGIN
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable jackett:
# jackett_enable="YES"

. /etc/rc.subr

name="jackett"
rcvar=jackett_enable

load_rc_config $name

: ${jackett_enable="YES"}
: ${jackett_user:="media"}
: ${jackett_data_dir:="/.config/Jackett"}

#pidfile="{jackett_data_dir}/jackett.pid"
procname="/usr/local/bin/mono"
command="/usr/sbin/daemon"
command_args="-f ${procname} /usr/local/Jackett/JackettConsole.exe --DataFolder {jackett_data_dir}"
start_precmd=jackett_precmd

jackett_precmd()
{
  export XDG_CONFIG_HOME=${jackett_data_dir}

  if [ ! -d ${jackett_data_dir} ]; then
  install -d -o ${jackett_user} ${jackett_data_dir}
  fi
}

run_rc_command "$1"
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Sorry about bumping this thread, but I actually created a jail of my own in order for Jackett to run. I installed all the prerequisites just fine and I modeled the rc configuration after sonarr or radarr. Both of those plugins/jails are working fine. But for Jackett, I'm having a really hard time on getting it to run. I read up on these forums about what other people have gone through, but it hasn't been much luck for me. The service starts for a second and then quits itself 2 to 3 seconds later. I know because if I type in service jackett status right after service jackett start, then I see a PID number. Note, this only occurs if that pid command in the rc file is commented out or nonexistent. Regardless, it still quits itself after. Jackett's data folder has the correct permission as does the folder where I extracted the linux binary to. I'll post my rc file, see if it makes a difference. If you guys could help me out, that would be awesome. Thanks!

rc.d/jackett:
Code:
#!/bin/sh
# Author: Liriel Baenre <liriel@sekrit.me>
#  Mark Felder <feld@FreeBSD.org>
#
#
# $FreeBSD$
#

# PROVIDE: jackett
# REQUIRE: LOGIN
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable jackett:
# jackett_enable="YES"

. /etc/rc.subr

name="jackett"
rcvar=jackett_enable

load_rc_config $name

: ${jackett_enable="YES"}
: ${jackett_user:="media"}
: ${jackett_data_dir:="/.config/Jackett"}

#pidfile="{jackett_data_dir}/jackett.pid"
procname="/usr/local/bin/mono"
command="/usr/sbin/daemon"
command_args="-f ${procname} /usr/local/Jackett/JackettConsole.exe --DataFolder {jackett_data_dir}"
start_precmd=jackett_precmd

jackett_precmd()
{
  export XDG_CONFIG_HOME=${jackett_data_dir}

  if [ ! -d ${jackett_data_dir} ]; then
  install -d -o ${jackett_user} ${jackett_data_dir}
  fi
}

run_rc_command "$1"
Can you just confirm the permissions of the data-directory by showing the output of "ls -l /.config/"
Also, something you can try is making the command=mono. Then when you start the service you will get the full output of the service running. This is good for debugging as you can see if/why it crashes.
 

TheDrifter363

Dabbler
Joined
Apr 17, 2017
Messages
10
Of course. Thanks Josh. Here's the output of "ls -l /.config/"

Output:
Code:
root@jackett_1:/ # ls -l /.config/
total 1
drwxr-xr-x  2 media  media  4 Apr 17 21:46 Jackett
root@jackett_1:/ #


Huh, this is interesting. I changed that command from /usr/sbin/daemon to mono, and I got something. It says warning, run_rc_command cannot run mono. That's odd.

Output:
Code:
root@jackett_1:/ # service jackett start
/etc/rc.d/jackett: WARNING: run_rc_command: cannot run mono
root@jackett_1:/ #


Also here's the changed jackett rc:
Code:
#!/bin/sh
# Author: Liriel Baenre <liriel@sekrit.me>
#  Mark Felder <feld@FreeBSD.org>
#
#
# $FreeBSD$
#

# PROVIDE: jackett
# REQUIRE: LOGIN
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable jackett:
# jackett_enable="YES"

. /etc/rc.subr

name="jackett"
rcvar=jackett_enable

load_rc_config $name

: ${jackett_enable="YES"}
: ${jackett_user:="media"}
: ${jackett_data_dir:="/.config/Jackett"}

#pidfile="{jackett_data_dir}/jackett.pid"
procname="/usr/local/bin/mono"
command="mono"
command_args="-f ${procname} /usr/local/Jackett/JackettConsole.exe --DataFolder {jackett_data_dir}"
start_precmd=jackett_precmd

jackett_precmd()
{
  export XDG_CONFIG_HOME=${jackett_data_dir}

  if [ ! -d ${jackett_data_dir} ]; then
  install -d -o ${jackett_user} ${jackett_data_dir}
  fi
}

run_rc_command "$1"
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Of course. Thanks Josh. Here's the output of "ls -l /.config/"

Output:
Code:
root@jackett_1:/ # ls -l /.config/
total 1
drwxr-xr-x  2 media  media  4 Apr 17 21:46 Jackett
root@jackett_1:/ #


Huh, this is interesting. I changed that command from /usr/sbin/daemon to mono, and I got something. It says warning, run_rc_command cannot run mono. That's odd.

Output:
Code:
root@jackett_1:/ # service jackett start
/etc/rc.d/jackett: WARNING: run_rc_command: cannot run mono
root@jackett_1:/ #


Also here's the changed jackett rc:
Code:
#!/bin/sh
# Author: Liriel Baenre <liriel@sekrit.me>
#  Mark Felder <feld@FreeBSD.org>
#
#
# $FreeBSD$
#

# PROVIDE: jackett
# REQUIRE: LOGIN
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable jackett:
# jackett_enable="YES"

. /etc/rc.subr

name="jackett"
rcvar=jackett_enable

load_rc_config $name

: ${jackett_enable="YES"}
: ${jackett_user:="media"}
: ${jackett_data_dir:="/.config/Jackett"}

#pidfile="{jackett_data_dir}/jackett.pid"
procname="/usr/local/bin/mono"
command="mono"
command_args="-f ${procname} /usr/local/Jackett/JackettConsole.exe --DataFolder {jackett_data_dir}"
start_precmd=jackett_precmd

jackett_precmd()
{
  export XDG_CONFIG_HOME=${jackett_data_dir}

  if [ ! -d ${jackett_data_dir} ]; then
  install -d -o ${jackett_user} ${jackett_data_dir}
  fi
}

run_rc_command "$1"
permissions look good.

when I said that I was just saying it in shorthand...
Code:
#procname="/usr/local/bin/mono"
command="/usr/local/bin/mono"
command_args="/usr/local/Jackett/JackettConsole.exe --DataFolder {jackett_data_dir}"
 

TheDrifter363

Dabbler
Joined
Apr 17, 2017
Messages
10
Understood. Thanks Josh, again. So I did as you said. And now I'm getting a permissions exception. I set chmod 777 on the /.config/ directory and everything below it. I even changed that folder's owner and group to media, still getting the same error.

Code:
Starting jackett.
04-18 14:05:20 Info Jackett Data will be stored in: {jackett_data_dir}
04-18 14:05:20 Error Top level exception Autofac.Core.DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = ServerService (ReflectionActivator), Services = [Jackett.Services.IServerService], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = IndexerManagerService (ReflectionActivator), Services = [Jackett.Services.IIndexerManagerService], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = ConfigurationService (ReflectionActivator), Services = [Jackett.Services.IConfigurationService], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An exception was thrown while invoking the constructor 'Void .ctor(ISerializeService, IProcessService, Logger)' on type 'ConfigurationService'. ---> Could not create settings directory. Access to the path "{jackett_data_dir}" is denied. (See inner exception for details.) (See inner exception for details.) (See inner exception for details.) (See inner exception for details.) ---> Autofac.Core.DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = IndexerManagerService (ReflectionActivator), Services = [Jackett.Services.IIndexerManagerService], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = ConfigurationService (ReflectionActivator), Services = [Jackett.Services.IConfigurationService], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An exception was thrown while invoking the constructor 'Void .ctor(ISerializeService, IProcessService, Logger)' on type 'ConfigurationService'. ---> Could not create settings directory. Access to the path "{jackett_data_dir}" is denied. (See inner exception for details.) (See inner exception for details.) (See inner exception for details.) ---> Autofac.Core.DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = ConfigurationService (ReflectionActivator), Services = [Jackett.Services.IConfigurationService], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An exception was thrown while invoking the constructor 'Void .ctor(ISerializeService, IProcessService, Logger)' on type 'ConfigurationService'. ---> Could not create settings directory. Access to the path "{jackett_data_dir}" is denied. (See inner exception for details.) (See inner exception for details.) ---> Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(ISerializeService, IProcessService, Logger)' on type 'ConfigurationService'. ---> Could not create settings directory. Access to the path "{jackett_data_dir}" is denied. (See inner exception for details.) ---> System.Exception: Could not create settings directory. Access to the path "{jackett_data_dir}" is denied.
  at Jackett.Services.ConfigurationService.CreateOrMigrateSettings () [0x0008a] in <466cd129c5b942c3aef59bfbe01fa48f>:0
  at Jackett.Services.ConfigurationService..ctor (Jackett.Services.ISerializeService s, Jackett.Services.IProcessService p, NLog.Logger l) [0x0001b] in <466cd129c5b942c3aef59bfbe01fa48f>:0
  at (wrapper dynamic-method) System.Object:lambda_method (System.Runtime.CompilerServices.Closure,object[])
  at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate () [0x0008f] in <d2e21a4947d7428dab6692e67eb66c09>:0
  --- End of inner exception stack trace ---
  at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate () [0x00113] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance (Autofac.IComponentContext context, System.Collections.Generic.IEnumerable`1[T] parameters) [0x00067] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Resolving.InstanceLookup.Activate (System.Collections.Generic.IEnumerable`1[T] parameters) [0x0001a] in <d2e21a4947d7428dab6692e67eb66c09>:0
  --- End of inner exception stack trace ---
  at Autofac.Core.Resolving.InstanceLookup.Activate (System.Collections.Generic.IEnumerable`1[T] parameters) [0x0004d] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Resolving.InstanceLookup.<Execute>b__5_0 () [0x00007] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare (System.Guid id, System.Func`1[TResult] creator) [0x0002f] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Resolving.InstanceLookup.Execute () [0x00051] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance (Autofac.Core.ISharingLifetimeScope currentOperationScope, Autofac.Core.IComponentRegistration registration, System.Collections.Generic.IEnumerable`1[T] parameters) [0x0005f] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Resolving.InstanceLookup.ResolveComponent (Autofac.Core.IComponentRegistration registration, System.Collections.Generic.IEnumerable`1[T] parameters) [0x00000] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Activators.Reflection.AutowiringParameter+<>c__DisplayClass0_0.<CanSupplyValue>b__0 () [0x00011] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate () [0x0003e] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance (Autofac.IComponentContext context, System.Collections.Generic.IEnumerable`1[T] parameters) [0x00067] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Resolving.InstanceLookup.Activate (System.Collections.Generic.IEnumerable`1[T] parameters) [0x0001a] in <d2e21a4947d7428dab6692e67eb66c09>:0
  --- End of inner exception stack trace ---
  at Autofac.Core.Resolving.InstanceLookup.Activate (System.Collections.Generic.IEnumerable`1[T] parameters) [0x0004d] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Resolving.InstanceLookup.<Execute>b__5_0 () [0x00007] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare (System.Guid id, System.Func`1[TResult] creator) [0x0002f] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Resolving.InstanceLookup.Execute () [0x00051] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance (Autofac.Core.ISharingLifetimeScope currentOperationScope, Autofac.Core.IComponentRegistration registration, System.Collections.Generic.IEnumerable`1[T] parameters) [0x0005f] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Resolving.InstanceLookup.ResolveComponent (Autofac.Core.IComponentRegistration registration, System.Collections.Generic.IEnumerable`1[T] parameters) [0x00000] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Activators.Reflection.AutowiringParameter+<>c__DisplayClass0_0.<CanSupplyValue>b__0 () [0x00011] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate () [0x0003e] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance (Autofac.IComponentContext context, System.Collections.Generic.IEnumerable`1[T] parameters) [0x00067] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Resolving.InstanceLookup.Activate (System.Collections.Generic.IEnumerable`1[T] parameters) [0x0001a] in <d2e21a4947d7428dab6692e67eb66c09>:0
  --- End of inner exception stack trace ---
  at Autofac.Core.Resolving.InstanceLookup.Activate (System.Collections.Generic.IEnumerable`1[T] parameters) [0x0004d] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Resolving.InstanceLookup.<Execute>b__5_0 () [0x00007] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare (System.Guid id, System.Func`1[TResult] creator) [0x0002f] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Resolving.InstanceLookup.Execute () [0x00051] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance (Autofac.Core.ISharingLifetimeScope currentOperationScope, Autofac.Core.IComponentRegistration registration, System.Collections.Generic.IEnumerable`1[T] parameters) [0x0005f] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Resolving.ResolveOperation.ResolveComponent (Autofac.Core.IComponentRegistration registration, System.Collections.Generic.IEnumerable`1[T] parameters) [0x00000] in <d2e21a4947d7428dab6692e67eb66c09>:0
  at Autofac.Core.Resolving.ResolveOperation.Execute (Autofac.Core.IComponentRegistration registration, System.Collections.Generic.IEnumerable`1[T] parameters) [0x00000] in <d2e21a4947d7428dab6692e67eb66c09>:0


Code:
root@jackett_1:/ # ls -l .config/
total 1
drwxrwxrwx  2 media  media  4 Apr 17 21:46 Jackett
root@jackett_1:/ #


Code:
root@jackett_1:/ # ls -la
total 111
drwxr-xr-x  18 root  wheel  22 Apr 17 16:38 .
drwxr-xr-x  18 root  wheel  22 Apr 17 16:38 ..
drwxrwxrwx  3 media  media  3 Apr 17 21:31 .config


These permission issues are not a problem if I load jackett manually as the user media. I can do su -m media, and jackett will start up normally with the correct data directory at /.config/Jackett.

Code:
root@jackett_1:/ # ls -l /.config/Jackett/
total 9
-rwxrwxrwx  1 media  media  308 Apr 17 21:46 ServerConfig.json
-rwxrwxrwx  1 media  media  13490 Apr 17 21:48 log.txt
root@jackett_1:/ #


loading normally:
Code:
root@jackett_1:/ # su -m media
media@jackett_1:/ % /usr/local/bin/mono /usr/local/Jackett/JackettConsole.exe --DataFolder /.config/Jackett/
04-18 14:12:07 Info Jackett Data will be stored in: /.config/Jackett/
04-18 14:12:07 Info App config/log directory: /.config/Jackett/
04-18 14:12:08 Info Starting Jackett 0.7.1296.0
04-18 14:12:08 Info Environment version: 4.0.30319.42000 (/usr/local/lib/mono/4.5)
04-18 14:12:08 Info OS version: Unix 10.3.0.0 (64bit OS) (64bit process)
04-18 14:12:08 Info ThreadPool MaxThreads: 200 workerThreads, 200 completionPortThreads
04-18 14:12:08 Info mono version: 4.6.2 (Stable 4.6.2.7/08fd525 Sat Apr 15 01:35:37 UTC 2017)
04-18 14:12:08 Info Using HTTP Client: UnixLibCurlWebClient
04-18 14:12:08 Info Loading Cardigann definitions from: /root/.config/cardigann/definitions/
04-18 14:12:08 Info Loading Cardigann definitions from: /etc/xdg/cardigan/definitions/
04-18 14:12:08 Info Loading Cardigann definitions from: /usr/local/Jackett/Definitions
04-18 14:12:08 Info Loading Cardigann definition /usr/local/Jackett/Definitions/2fast4you.yml
04-18 14:12:08 Info Loading Cardigann definition /usr/local/Jackett/Definitions/3dtorrents.yml
04-18 14:12:08 Info Loading Cardigann definition /usr/local/Jackett/Definitions/acidlounge.yml
04-18 14:12:08 Info Loading Cardigann definition /usr/local/Jackett/Definitions/aox.yml
04-18 14:12:08 Info Loading Cardigann definition /usr/local/Jackett/Definitions/apollo.yml
04-18 14:12:08 Info Loading Cardigann definition /usr/local/Jackett/Definitions/arabafenice.yml
04-18 14:12:08 Info Loading Cardigann definition /usr/local/Jackett/Definitions/asiandvdclub.yml
04-18 14:12:08 Info Loading Cardigann definition /usr/local/Jackett/Definitions/audiobooktorrents.yml
04-18 14:12:08 Info Loading Cardigann definition /usr/local/Jackett/Definitions/bigtorrent.yml
04-18 14:12:08 Info Loading Cardigann definition /usr/local/Jackett/Definitions/bithq.yml
04-18 14:12:08 Info Loading Cardigann definition /usr/local/Jackett/Definitions/bithumen.yml
04-18 14:12:08 Info Loading Cardigann definition /usr/local/Jackett/Definitions/bitspyder.yml
04-18 14:12:08 Info Loading Cardigann definition /usr/local/Jackett/Definitions/blubits.yml
04-18 14:12:08 Info Loading Cardigann definition /usr/local/Jackett/Definitions/bluebird.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/btnext.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/carpathians.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/chdbits.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/cinemageddon.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/cinematik.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/classix.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/czteam.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/datascene.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/diablotorrent.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/dragonworld.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/dragonworldreloaded.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/dreamteam.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/eotforum.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/estone.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/ethor.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/eztv.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/fanoin.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/freedomhd.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/fullmixmusic.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/funkytorrents.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/gfxpeers.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/gigatorrents.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/gods.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/gormogon.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/greekteam.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/hdbits.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/hdbitscom.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/hdchina.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/hdclub.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/hdhome.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/hdme.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/hdsky.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/hdtorrentsit.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/hon3yhd.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/hyperay.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/icetorrent.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/ilcorsaronero.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/iloveclassics.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/infinityt.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/inperil.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/insanetracker.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/isohunt.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/jpopsuki.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/kapaki.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/karagarga.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/kickasstorrent-kathow.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/kickasstorrent.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/leparadisdunet.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/limetorrents.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/linkomanija.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/losslessclub.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/magico.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/majomparade.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/mononokebt.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/mteamtp.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/myspleen.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/nachtwerk.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/nethd.yml
04-18 14:12:09 Info Loading Cardigann definition /usr/local/Jackett/Definitions/newretro.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/nyaa.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/ourbits.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/passionetorrent.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/polishsource.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/polishtracker.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/ptfiles.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/qctorrent.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/rockhardlossless.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/rodvd.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/sdbits.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/secretcinema.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/shareisland.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/sharespacedb.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/shellife.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/skytorrents.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/tasmanit.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/tenyardtracker.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/theempire.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/thehorrorcharnel.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/thepiratebay.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/theshinning.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/thetorrents.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/tntvillage.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/torrent9.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/torrentbd.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/torrentccf.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/torrenthr.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/torrenting.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/torrentproject.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/torrentsectorcrew.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/torrentsmd.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/torrentz2.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/torviet.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/totheglory.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/trancetraffic.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/uhdbits.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/ultimategamerclub.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/ultrahdclub.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/utorrents.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/waffles.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/worldofp2p.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/xtremezone.yml
04-18 14:12:10 Info Loading Cardigann definition /usr/local/Jackett/Definitions/ztracker.yml
04-18 14:12:10 Info LibCurl init Ok
04-18 14:12:10 Info LibCurl version libcurl/7.53.1 OpenSSL/1.0.1s zlib/1.2.8 nghttp2/1.21.1
04-18 14:12:10 Info Starting web server at http://*:9117/
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
ok, see the issue. your {jackett_data_dir} is missing a $
 

TheDrifter363

Dabbler
Joined
Apr 17, 2017
Messages
10
Hmm so now I'm getting an unmatched " error. I'm trying to find where am I missing a quotation mark, but I can't find it.

Code:
root@jackett_1:/ # cat /etc/rc.d/jackett
#!/bin/sh
# Author: Liriel Baenre <liriel@sekrit.me>
#  Mark Felder <feld@FreeBSD.org>
#
#
# $FreeBSD$
#

# PROVIDE: jackett
# REQUIRE: LOGIN
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable jackett:
# jackett_enable="YES"

. /etc/rc.subr

name="jackett"
rcvar=jackett_enable

load_rc_config $name

: ${jackett_enable="YES"}
: ${jackett_user:="media"}
: ${jackett_data_dir:="/.config/Jackett"}

#pidfile="${jackett_data_dir}/jackett.pid"
procname="/usr/local/bin/mono"
command="/usr/sbin/daemon"
command_args="-f ${procname} /usr/local/Jackett/JackettConsole.exe
--DataFolder ${jackett_data_dir}"
start_precmd=jackett_precmd

jackett_precmd()
{
  export XDG_CONFIG_HOME=${jackett_data_dir}

  if [ ! -d ${jackett_data_dir} ]; then
  install -d -o ${jackett_user} ${jackett_data_dir}
  fi
}

run_rc_command "$1"


Code:
root@jackett_1:/ # service jackett start
Starting jackett.
Unmatched ".
Unmatched ".
/etc/rc.d/jackett: WARNING: failed to start jackett
root@jackett_1:/ #
 
Status
Not open for further replies.
Top