(humble) Request: Installation guide for Deluge in a jail on 9.10 (current stable build)

Status
Not open for further replies.

NigelNoFriends

Explorer
Joined
Mar 29, 2016
Messages
56
Hello Gurus.

I have been struggling with he installation of Deluge in a standard (new) jail for some time.
Have found and followed many guides, troubleshoots, tweaks etc from various forums and blogs, none of which have completely worked. Various errors arise (depending on the guide or tweak I follow), but I think because all the guides are dated, there's been lots of changes to pages directories/paths. I can follow a guide, just not savvy enough to identify the problem/work-around on a more technical level.

So - I am hoping that someone a little more FreeNAS savvy, running the most recent stable FreeNAS 9.10 build, could spare a little time to do a jailed install and bluet point the steps for everyone looking to install it for the first time today.

Thanks in advance for your time, effort, and generosity!
 

Mirfster

Doesn't know what he's talking about
Joined
Oct 2, 2015
Messages
3,215

NigelNoFriends

Explorer
Joined
Mar 29, 2016
Messages
56
So this thread does not help? I do not use it personally, so do not have any experiences to go off of...

"Install DELUGE in a jail"

Per the Author:

Unfortunately not. That one got my hopes up when I first found it, because it was pretty only a bit over a month old! But still no good. After installation, you cant start the daemons due to them not being in the folders they should be (or something to that effect.).

Give me a shout if you end up giving it a go for the lols - can always delete the jail whether it works or not (i must have made/deleted 20+ jails, from all the guides/attempts.
 

Mirfster

Doesn't know what he's talking about
Joined
Oct 2, 2015
Messages
3,215
Can you describe what issues you may be having? Also, please note that there currently is an issue with the Certificate that *may* be causing issues with jail templates being downloaded (not 100% sure)...

"Certificate Errors?"
 

Nucshuco

Explorer
Joined
Aug 22, 2014
Messages
52
Something changed with the pkg install deluge. Its not installing the same way as before. working on it.
 
Last edited:

Nucshuco

Explorer
Joined
Aug 22, 2014
Messages
52
working on it.
 
Last edited:

NigelNoFriends

Explorer
Joined
Mar 29, 2016
Messages
56
I edited a few thing that I missed in the install and startup script.
chown -R nobody:nobody /home/deluge/.config/deluge/

cd /home/deluge/.config/deluge/
echo "YOURUSERNAME:YOURPASSWORD:10" >> auth (for GTK)
ee /home/deluge/.config/deluge/core.conf

Thanks very much for putting all that together for me! I haven't been able to go through it yet as I'm having network problems at the moment, preventing me from being able to download the entire deluge pkg in one go (or even 50 seperate goes, for that matter - just keeps timing out when trying to fetch files).

I don't suppose you know exactly where the system puts all the files, before extracting/installing at the end? That way I could manually download the parts in a broswer and put them in said directory before running pkg install deluge - so it'd have everything it needs initially.
 

NigelNoFriends

Explorer
Joined
Mar 29, 2016
Messages
56
Try this
mkdir /var/db/deluge
chown -R nobody:nobody /home/deluge/.config/deluge/
chown -R nobody:nobody /var/db/deluge (I run CP and SR as nobody. makes it easy for me. just change startup scripts to user nobody and chown db and install directories)
cd /usr/local/etc/rc.d

Also, I can't seem to find 'home' directory anywhere - unless this is a substitute word for something?
 
Last edited:

Nucshuco

Explorer
Joined
Aug 22, 2014
Messages
52
Sorry
pkg install deluge installs everything BUT deluge now. not sure whats going on. Was working earlier this year.
I also tried cd /usr/ports/net-p2p/deluge/ && make install clean with the same results.
 
Last edited:

NigelNoFriends

Explorer
Joined
Mar 29, 2016
Messages
56
Sorry
pkg install deluge installs everything BUT deluge now. not sure whats going on. Was working earlier this year.
I also tried cd /usr/ports/net-p2p/deluge/ && make install clean with the same results.

Yeah, I have had hit-and-miss installation (port/pkg) over last week or two.
At the moment my pkg install fails on this file: http://pkg.FreeBSD.org/freebsd:10:x86:64/latest/All/gcc-4.8.5_2.txz
I can download it OK through a browser, I just don't know where to put it within FreeNAS.
 

NigelNoFriends

Explorer
Joined
Mar 29, 2016
Messages
56
Sorry
pkg install deluge installs everything BUT deluge now. not sure whats going on. Was working earlier this year.
I also tried cd /usr/ports/net-p2p/deluge/ && make install clean with the same results.
So what're you thinking? Broken package - nothing to do until (if) they fix it?
 

Nucshuco

Explorer
Joined
Aug 22, 2014
Messages
52
yes I think its broke. If you look at this link he made a lot of changes on
Modified Fri Apr 1 14:16:16 2016 UTC (2 months, 3 weeks ago) by mat
When I installed was working perfect
Modified Tue Sep 22 07:01:16 2015 UTC (9 months ago) by rm
 

NigelNoFriends

Explorer
Joined
Mar 29, 2016
Messages
56
yes I think its broke. If you look at this link he made a lot of changes on
Modified Fri Apr 1 14:16:16 2016 UTC (2 months, 3 weeks ago) by mat
When I installed was working perfect
Modified Tue Sep 22 07:01:16 2015 UTC (9 months ago) by rm
Do you know if there away from me/anyone to let him know? feedback or something - like git? (sorry for all these Qs - it's just that qbittorrent and transmission don't cut it. I'm hoping deluge will be a nice balance. Unless you know of a different client that works in a jail?)
 

NigelNoFriends

Explorer
Joined
Mar 29, 2016
Messages
56
Thank - have sent of an email.

Side note - got installed (eventually) using the pkg install call.
When you try to start the deluged service, it tells you to first add deluged_enable="YES" to etc/rc.conf.
After you've done that, try to start the service again and you get this:

Code:
root@deluge:/ # service deluged start
/usr/local/etc/rc.d/deluged: WARNING: /home/asjklasdfjklasdf/.config/deluge is not a directory.
/usr/local/etc/rc.d/deluged: WARNING: failed precmd routine for deluged
root@deluge:/ # 


So it's looks (to my untrained eye) that some of the targets are messed up.
Anyway, will wait and see if I hear back from the maintainer.
Cheers.
 

Nucshuco

Explorer
Joined
Aug 22, 2014
Messages
52
can you do pkg info and post here so I can see.
 

Nucshuco

Explorer
Joined
Aug 22, 2014
Messages
52
OK something got fixed and pkg install deluge is working now.
so try this

jexec deluge csh
pkg upgrade
pkg install deluge
mkdir /var/db/deluge
chown -R nobody:nobody /var/db/deluge
cd /usr/local/etc/rc.d
rm deluged
touch deluged
chmod 777 deluged
ee deluged
paste startup script deluged into deluged
Code:
#!/bin/sh
#
# deluged RCng startup script
# created by: R.S.A. aka .faust
# mail: rsa dot aka dot f at gmail dot com
#

# PROVIDE: deluged
# REQUIRE: NETWORKING SERVERS DAEMON ldconfig resolv
# BEFORE: LOGIN
# KEYWORD: shutdown

# Add the following line to /etc/rc.conf.local or /etc/rc.conf to enable deluged at startup
# deluged_enable="YES"
#
# cfg_dir (str): Specify the full path to directory with deluged config files
# log (str): Specify the full path to the LOG file
# loglevel (str): Set loglevel (Available: none, info, warning, error, critical, debug)
# pidfile (str): Specify the full path to the PID file
# deluged_user (str): Set to user running deluged
#
# Warning! Rights to folders and files must be "rwx" for the user under which deluged is run

. /etc/rc.subr

name="deluged"
rcvar=`set_rcvar`

load_rc_config $name
deluged_enable=${deluged_enable:=NO}

cfg_dir="/var/db/deluge/"
log="/var/db/deluge/deluged.log"
loglevel="info"
pidfile="${cfg_dir}${name}.pid"
deluged_user="nobody"

required_dirs=${cfg_dir}

command_interpreter="/usr/local/bin/python2.7"
command="/usr/local/bin/${name}"
start_cmd="${name}_start"

deluged_start()
{
if [ ! -f "${pidfile}" ]; then
su -m ${deluged_user} -c "/usr/local/bin/${name} -c ${cfg_dir} -L ${loglevel} -l ${log} -P ${pidfile}"
echo "Starting ${name}."
else
GETPROCESSPID=`/bin/ps -auxw | /usr/bin/awk '/deluged/ && !/awk/ && !/sh/ {print $2}'`
PIDFROMFILE=`cat ${pidfile}`
if [ "$GETPROCESSPID" = "$PIDFROMFILE" ]; then
echo "${name} already running with PID: ${PIDFROMFILE} ?"
echo "Remove ${pidfile} manually if needed."
else
rm -f ${pidfile}
su -m ${deluged_user} -c "/usr/local/bin/${name} -c ${cfg_dir} -l ${log} -P ${pidfile}"
echo "Starting ${name}."
fi
fi
}
run_rc_command "$1"

save it

echo 'deluged_enable="YES"' >> /etc/rc.conf
service deluged start
service deluged stop
cd /var/db/deluge
echo "YOURuserNAME:YOURpassWORD:10" >> auth
(Thats for GTK)
ee /var/db/deluge/core.conf
line 24 Replace this line -> "allow_remote": false, with this line -> "allow_remote": true,
sh /usr/local/bin/geoipupdate.sh
service deluged start
 
Last edited:

Nucshuco

Explorer
Joined
Aug 22, 2014
Messages
52
For deluge web page to work

cd /usr/local/etc/rc.d
touch delugew
chmod 777 delugew
ee delugew
paste startup script delugew into delugew
Code:
#!/bin/sh
#
# deluge-web RCng startup script
# created by: R.S.A. aka .faust
# mail: rsa dot aka dot f at gmail dot com
#

# PROVIDE: delugew
# REQUIRE: NETWORKING SERVERS DAEMON ldconfig resolv
# BEFORE: LOGIN
# KEYWORD: shutdown
# Add the following line to /etc/rc.conf.local or /etc/rc.conf to enable deluge-web at startup
# delugew_enable="YES"
#
# cfg_dir (str): Specify the full path to directory with deluge-web config files
# log (str): Specify the full path to the LOG file
# pidfile (str): Specify the full path to the PID file
# delugew_user (str): Set to user running deluge-web
#
# Warning! Rights to folders and files must be "rwx" for the user under which deluge-web is run
. /etc/rc.subr

name="delugew"
rcvar=`set_rcvar`

load_rc_config $name
delugew_enable=${delugew_enable:=NO}

cfg_dir="/var/db/deluge/"
log="/var/db/deluge/delugew.log"
loglevel="info"
pidfile="${cfg_dir}${name}.pid"
delugew_user="nobody"

required_dirs=${cfg_dir}

command_interpreter="/usr/local/bin/python2.7"
command="/usr/local/bin/deluge-web"
start_cmd="${name}_start"
start_postcmd="${name}_poststart"

delugew_start()
{
if [ ! -f "${pidfile}" ]; then
su -m ${delugew_user} -c "/usr/local/bin/deluge-web -f -c ${cfg_dir} -l ${log}"
echo "Starting ${name}."
else
GETPROCESSPID=`/bin/ps -auxw | /usr/bin/awk '/deluge-web/ && !/awk/ && !/sh/ {print $2}'`
PIDFROMFILE=`cat ${pidfile}`
if [ "$GETPROCESSPID" = "$PIDFROMFILE" ]; then
echo "${name} already running with PID: ${PIDFROMFILE} ?"
echo "Remove ${pidfile} manually if needed."
else
rm -f ${pidfile}
su -m ${delugew_user} -c "/usr/local/bin/deluge-web -f -c ${cfg_dir} -l ${log}"
echo "Starting ${name}."
fi
fi
}

delugew_poststart()
{
echo `/bin/ps -auxw | /usr/bin/awk '/deluge-web/ && !/awk/ {print $2}'` > $pidfile
}

run_rc_command "$1"

save it

echo 'delugew_enable="YES"' >> /etc/rc.conf
service delugew start

default port for web user interface : 8112
default admin password : deluge
cmdeluge.JPG

delugeweb.JPG

default port for GTK user interface : 58846
gtkdeluge1.JPG

delugegtk.JPG
 
Last edited:
Status
Not open for further replies.
Top