PDA

Bekijk de volledige versie : run transmission-daemon at startup?



avberk
13-01-2008, 10:12
I have tried to start 'transmission-daemon' at startup (init.d)
but it doesn't want to start. I am sure i have the correct syntax and permissions.

Is it possible to start this daemon at startup at all?
( i don't want to use cron if possible)

oleo
13-01-2008, 16:45
You could enter

ln -s /opt/sbin/transmission_watchdog /opt/etc/init.d/S99transmission

Running watchdog once a hour makes queue processing possible. Without cron you take care of pressing watchdog button to complete torrents!

avberk
14-01-2008, 23:30
Hi Oleo,

I don't want to start 'transmissiond', but 'transmission-daemon'.

I don't know the reason, but also with symbolic link it doesn't want to autostart.

Any idea why this is?

oleo
15-01-2008, 12:21
How do you intend to use transmission-daemon? This is completely different source as transmissiond. Maybe you are missing HOME variable!

avberk
15-01-2008, 19:11
I am using it with clutch and it works pretty well already.

I can start 'transmission-daemon' manually without any problem.
Via 'cron 'or via '/opt/et/init.d' i have no luck. :(

Maybe a runlevel issue or so? I really have no clue..

I'll try using the HOME variable inside a startup script one of these days....

avberk
16-01-2008, 16:22
Tried with the HOME variable. no luck.

Anybody any luck with starting 'transmission-daemon' automatically in one way or the other?

avberk
27-01-2008, 15:36
Oleo,

Is there no way to start transmission-daemon via init.d?

If you have a possibility to fix this could you do so? :rolleyes:


A workaround i found is to manually start a changed transmission_watchdog .cgi script via a webinterface.
The script (made working via trial and error):

#!/bin/sh

cat << __EOF__
__EOF__


case "Watchdog" in

Watchdog) /opt/var/appWeb/web/cgi-bin/clutch.sh ;;

esac

cat << __EOF__


=//=

and clutch.sh:

#!/bin/sh


#check if Transmission daemon is running
if [ -f /opt/var/run/transmission.pid ] ; then
PID=`cat /opt/var/run/transmission.pid`
grep -q transmission-daemon /proc/${PID}/cmdline 2> /dev/null
if [ $? != 0 ]; then
is_running=no
else
is_running=yes
fi
else
is_running=no
fi

if [ ${is_running} = "no" ]; then
[ -f /opt/var/run/transmission.pid ] && rm /opt/var/run/transmission.pid
cd /tmp/harddisk/torrent && transmission-daemon -p /opt/var/run/transmission.pid -s /etc/transmission.socket
sleep 1
chown nobody.nobody /etc/transmission.socket
warning "Transmission daemon restarted!"
sleep 1
exit 1
fi

oleo
27-01-2008, 17:25
Could you give me command line description how you start daemon and why it does not start?
Like
HOME=/tmp transmission-daemon -p /tmp/td.pid
HOME=/tmp transmission-remote -i

avberk
28-01-2008, 20:11
Hi Oleo,

I tried:

HOME=/tmp transmission-daemon -p /tmp/td.pid

from the command line. The daemon starts. No problem.


I tried:

HOME=/tmp transmission-daemon -p /tmp/td.pid
inside opt/etc/init.d/S88Transmission and chmod 777 on it. Reboot the wl500gp. The daemon does NOT start.

Have you tried running the script from init.d on boot???
Does that work for you?

DrChair
29-01-2008, 21:38
I tried:

HOME=/tmp transmission-daemon -p /tmp/td.pid
inside opt/etc/init.d/S88Transmission and chmod 777 on it. Reboot the wl500gp. The daemon does NOT start.


When S88Transmission is run, probably $PATH is not be set, so it can't find transmission-deamon. (Path is set at logon, and some other start-up files)

Try adding: export PATH=/opt/bin:/opt/sbin:$(PATH) to the start-up file

avberk
31-01-2008, 20:12
Dr. Chair, That did the trick!!!

Thanks a lot! :)

gixie
03-02-2008, 01:47
I seem to have the same problem...
I was able to start transmission-daemon with

HOME=/tmp transmission-daemon -p /tmp/td.pid

So I guess what worked for you guys will work for me. So, given that I'm a linux noob, please point exactly what you did, what config files need to be altered. Thanks in advance!

avberk
03-02-2008, 18:08
in /opt/etc/init.d

create a file called 'S88transmission' with following contents:

#!/bin/sh
export PATH=/opt/bin:/opt/sbin:$(PATH)
HOME=/tmp
transmission-daemon


Save the file and do a:
chmod 755 S88transmission


After a reboot transmission-daemon should start

oleo
04-02-2008, 00:07
I have created clutch package (http://trac.nslu2-linux.org/optware/changeset/7712) for easier clutching of transmission-daemon and lighttpd.

There is now separate /opt/etc/clutch.conf and startup file that allows simultaneous running of transmissiond and transmission-daemon. On separate HOME and WORK directories of course as approaches to torrent treatment is different.

I must quote Jamie Zawinski at this point:

Every program attempts to expand until it can send mail. Those programs which cannot so expand are replaced by ones which can.

avberk
04-02-2008, 13:33
Hi Oleo,

typo in the clutch package:

I think line 132 should start with a #


2008-02-04 14:17:06: (configfile.c.855) source: /opt/etc/lighttpd/lighttpd.conf line: 132 pos: 19 parser failed somehow near here: .pl

oleo
04-02-2008, 17:59
I've saw this but forgot to fix it. Just comment back that line.
changeset/7715 (http://trac.nslu2-linux.org/optware/changeset/7715) fixes this for new installs.

avberk
04-02-2008, 19:13
Oleo,


-Without specifying the -s parameter for transmission-daemon
i think clutch will still not start. Has to do something with user rights clutch needs to access the socket file.

oleo
04-02-2008, 20:34
There is no neeed for -s. Socket is specified within file. See S88clutch for details.

piezomotor
04-02-2008, 21:40
in /opt/etc/init.d

create a file called 'S88transmission' with following contents:

#!/bin/sh
export PATH=/opt/bin:/opt/sbin:$(PATH)
transmission-daemon


Save the file and do a:
chmod 755 S88transmission


After a reboot transmission-daemon should start

Sorry I did not get it, what is the benefit of creating S88transmission? It starts without S88transmission, as I have these lines:

transmissiond -p 65534 -w 300 -u 30 -d -1 -i /opt/var

Thanks.

oleo
05-02-2008, 08:13
transmissiond and transmission-daemon are two distinct type of daemons. For the first suggestion is that starting is handlet through transmission_watchdog