Deluge 1.3.5 Startup Script FreeBSD 9

General support for problems installing or using Deluge
Post Reply
ghuber
New User
New User
Posts: 5
Joined: Sun Nov 11, 2012 1:22 pm

Deluge 1.3.5 Startup Script FreeBSD 9

Post by ghuber »

Hi,

Unfortunately the forum search hasn't been much of a success: I am trying to get the deluged (and deluge web-ui) startup scripts to work but no matter how often I reboot, there is no process started.

Unfortunately I am pretty new to FreeBSD (on a headless server) and can't even find the log files telling me what's wrong (nothing found in /var/log).

I would prefer not to run the deluged processes as root but as an individual "deluge" user which I adapted in the script. Under this assumption: if (I ever manage to have) the user "deluge" start the deluged process, will another user (say "alex", group wheel) be able to connect to the daemon using deluge-console? or may only the process owner access the daemon?

The user "deluge" is a member of the admin group and has no password (and cannot login). I created /home/deluge and /home/deluge/config according to the script. I chmodded these directories to 777. The script in rc.d/deluged is set to -rwxrwxrwx. The 'enable_deluge="YES"' has been added to the /etc/rc.cof file.

Although I seem to understand parts of what the script tries to do, I don't know what I am doing wrong so that the script won't start the process(es).

While I am at embarrassing myself with noob questions, let me shoot another one at you: say I (with your help) manage to get deluged started automatically, and then invoke deluge-web as a different user (say "alex"), will that user connect to the same daemon or does deluge-web feature a built-in daemon, meaning that I have two totally separate torrent clients running?

Thank you so much for helping me, please let me know what additional information you'd require.

Georg

HP N40L, Nas4Free 9.0.1 (FreeBSD 9.1 RC2)

{EDIT}: From the boot-up sequence (I was holding the pause key) I found this line: /etc/rc: WARNING: /home/asjklasdfjklasdf/.config/deluge is not a directory
/etc/rc: WARNING: failed precmd routine for deluged.

Anyone can make anything of that? I have no idea what or who asjklasdfjklasdf is, certainly I have not created such user

{/EDIT}
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge 1.3.5 Startup Script FreeBSD 9

Post by Cas »

If you look in the deluge script provided by FreeBSD then you will see you are supposed to create and change the user from 'asjklasdfjklasdf'. The fact that it throws an error with the that user means you have not configured it properly.

Connecting with deluge-console from another user to the one running deluged will not work when running on localhost unless you can access the localhost password in deluge's config auth file. If you copy that line (or entire auth file) from the 'deluge user' deluge config and into your deluge config then it should work.

Running deluge-web from another user will encounter the same issues as above and is probably best avoided. deluge-web can be forked (-f) just like deluged to the background so yes you will have both running and usually another startup script would be used to control it.
ghuber
New User
New User
Posts: 5
Joined: Sun Nov 11, 2012 1:22 pm

Re: Deluge 1.3.5 Startup Script FreeBSD 9

Post by ghuber »

Hi CAS,

Thank you so much for your incredibly speedy reply!

I figured it is some kind of name confusion; however my script (as from the Deluge Site) looks like this:

Code: Select all

#!/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"
#
# pidfile  (str):            Specify the full path to the PID file
# log (str):                    Specify the full path to the LOG file
# deluged_user (str):  Set to user running deluge-web
# cfg_dir (str):            Specify the full path to directory with deluge config files
# loglevel (str):      Set loglevel (Available: none, info, warning, error, critical, debug)
#
#  Warning! Rights to folders and files must be "rwx" for the user under which the run deluge 
 
. /etc/rc.subr
 
name="deluged"
rcvar=`set_rcvar`
 
load_rc_config $name
deluged_enable=${deluged_enable:=NO}

log="/home/deluge/${name}.log"
loglevel="error"
pidfile="/home/deluge/${name}.pid"
cfg_dir="/home/deluge/config/"
deluged_user="deluge"
so there is no user "asjklasdfjklasdf" there. Any ideas where this user might "come from"? What would I have to take care in order for the script to use "my" user "deluge"?

Again many thanks for your help

Georg
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge 1.3.5 Startup Script FreeBSD 9

Post by Cas »

That link is a script provided by the FreeBSD Deluge package and the one on our site has been created by a FreeBSD user so I do not know which is newer/better, however I would guess the former.

If you are seeing that user appear in logs then the package startup script must be running and since both scripts are using the same vars I expect problems will occur.
ghuber
New User
New User
Posts: 5
Joined: Sun Nov 11, 2012 1:22 pm

Re: Deluge 1.3.5 Startup Script FreeBSD 9

Post by ghuber »

Oops! I was not aware that the package supplied its own script! can you tell me the "name" of the package startup script and where it resides? I have found nothing in /etc/rc.d/ which sound like deluge :-(

Thanks

Georg
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge 1.3.5 Startup Script FreeBSD 9

Post by Cas »

No idea, we do not create the package for FreeBSD. Best thing is to grep all the files in /etc/rc* for that user or alternatively use locate command, looking for files named deluge.
FreebsdDeluger
New User
New User
Posts: 2
Joined: Tue Feb 17, 2015 2:58 am

Re: Deluge 1.3.5 Startup Script FreeBSD 9

Post by FreebsdDeluger »

nano /etc/rc.conf
add the following deluged_user="deluge"
Save and retry. The script resides in /usr/local/etc/rc.d/deluged. This is where most of the scripts go.

I can get deluged and deluge_web scripts to run manually. The problem I am facing is that when I try to restart finch or reboot, finch never fully restarts if I have deluge_enable="YES" in rc.conf. if I make deluge_enable="NO" and restart finch it fully starts and then I have to manually change rc.conf and manually start deluged. Is there a process that I need to wait for before trying to start deluged? That is what seems to be the problem.
Post Reply