qbittorrent-nox doesn't start as service in FreeBSD #15056
Replies: 2 comments 1 reply
-
What is this? : ${qbittorrent_enable="NO"}
: ${qbittorrent_conf_dir="/var/db/qbittorrent/conf"}
: ${qbittorrent_download_dir="/var/db/qbittorrent/Downloads"}
: ${qbittorrent_user=qbittorrent}
: ${qbittorrent_group=qbittorrent} It should probably look like this. |
Beta Was this translation helpful? Give feedback.
-
I was curious about what you were doing and how those variables are set and how it may conflicting with you changing the path, so I loaded FreeBSD 13 in a VM. I used this https://www.freshports.org/net-p2p/qbittorrent and tested both quarterly and latest version. The first thing I will say is your Here is the stock untouched file. #!/bin/sh
# PROVIDE: qbittorrent
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable this service:
#
# qbittorrent_enable: Set to NO by default. Set it to YES to enable it.
# qbittorrent_conf_dir: Directory where qbittorrent configuration
# data is stored.
# Default: /var/db/qbittorrent/conf
# qbittorrent_download_dir: Directory to store downloaded data.
# Default: /var/db/qbittorrent/Downloads
# qbittorrent_user: The user account transmission daemon runs as.
# Default is 'qbittorrent'
# qbittorrent_group: The group associated with username qbittorrent
# daemon runs as. Default is 'qbittorrent'
#
. /etc/rc.subr
name=qbittorrent
rcvar=qbittorrent_enable
load_rc_config $name
: ${qbittorrent_enable="NO"}
: ${qbittorrent_conf_dir="/var/db/qbittorrent/conf"}
: ${qbittorrent_download_dir="/var/db/qbittorrent/Downloads"}
: ${qbittorrent_user=qbittorrent}
: ${qbittorrent_group=qbittorrent}
command="/usr/local/bin/qbittorrent-nox"
command_args="--daemon"
qbittorrent_flags=" \
${qbittorrent_conf_dir:+--profile=${qbittorrent_conf_dir}} \
${qbittorrent_download_dir:+--save-path=${qbittorrent_download_dir}} \
${qbittorrent_flags}"
run_rc_command $1 I did this to use the latest you can do this but it does not matter for this particular test.
After the installation I did just this modification: I used nano to make the edit pkg install nano I edited this file nano /etc/rc.conf And added this line to the end hostname="server"
keymap="uk.kbd"
ifconfig_em0="DHCP"
ifconfig_em0_ipv6="inet6 accept_rtadv"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
zfs_enable="YES"
qbittorrent_enable="YES" Now starting the service worked fine. service qbittorrent start root@server:~ # service qbittorrent start
Starting qbittorrent. And here it is running I suggest you revert your |
Beta Was this translation helpful? Give feedback.
-
So I have this problem where qbittorrent-nox, the FreeBSD package, doesn't start as a service. The command works when put into a terminal, but trying to run the script using rc.conf or service qbittorrent-nox start results in a silent failure, with no error log that I can find.
The RC script seems OK to me, my arguments are the same I give on the command line, qbittorrent is the owner of its directories... I don't know why it does that...
/etc/rc.conf
/usr/local/etc/rc.d/qbittorrent
/usr/local/etc/qbittorrent/qBittorrent/config/qBittorrent.conf
If I run qbittorrent-nox --profile=/usr/local/etc/qbittorrent/ -d from the command line as root, it works fine, daemonizes, and reads its configuration script, the web ui serves pages, and downloads files, and links.
It's not that big a problem, since I don't use it that often, and don't reboot my server very often, but it's still a problem, and it gnaws at me every time I stumble upon it.
I searched, and it seems other people are having problems with the RC script on FreeNAS, but their fixes are... kinda weird, and don't necessarily apply to my situation... some "fixes" are also misleading, just troll config scripts, as well...
This is the files as they are now, I've tried several variants/methods, maybe 50 variations over the years, trying to get it to start from its RC script, but no luck...
Any help understanding the problem would be greatly appreciated.
It's in a jail, of course...
Also come to think of it, I'm not sure who the package maintainer is, so maybe you're not responsible for the RC script, and maybe you got no idea what I'm talking about... If so, please let me know, and I'll try ti find the package mainrainer, but if you can help, like I said, I would appreciate a lot, because I tried pretty hard to get it going...
Also it's in a jail, of course, but runs fine from the command line, so...
Beta Was this translation helpful? Give feedback.
All reactions