NetVision-Technik

NetVision-Technik (http://www.netvision-technik.de/forum/index.php)
-   Webanwendungen (http://www.netvision-technik.de/forum/forumdisplay.php?f=13)
-   -   [Tutorial] rTorrent mit WebUI unter Debian (http://www.netvision-technik.de/forum/showthread.php?t=6281)

pat 03.11.2013 09:47

Jop ken thema.

Schreib mich privat an.


Den User mit home verzeichniss legst mit adduser an

Danach passwd (dein angelegter user name)

en simplen user legst du mit useradd an

danach wieder passwd (dein username)

netshadow 14.11.2013 12:17

Weiß einer wie ich den Parameter für HTTPS-Torrents (also -o http_capath=/etc/ssl/certs) in dieses Startscript einbinde?:

Klicke hier, um den gesamten Text zu sehen

#!/bin/sh
#############
###<Notes>###
#############
# This script depends on screen.
# For the stop function to work, you must set an
# explicit session directory using ABSOLUTE paths (no, ~ is not absolute) in your rtorrent.rc.
# If you typically just start rtorrent with just "rtorrent" on the
# command line, all you need to change is the "user" option.
# Attach to the screen session as your user with
# "screen -dr rtorrent". Change "rtorrent" with srnname option.
# Licensed under the GPLv2 by lostnihilist: lostnihilist _at_ gmail _dot_ com
##############
###</Notes>###
##############

#######################
##Start Configuration##
#######################
# You can specify your configuration in a different file
# (so that it is saved with upgrades, saved in your home directory,
# or whateve reason you want to)
# by commenting out/deleting the configuration lines and placing them
# in a text file (say /home/user/.rtorrent.init.conf) exactly as you would
# have written them here (you can leave the comments if you desire
# and then uncommenting the following line correcting the path/filename
# for the one you used. note the space after the ".".
# . /etc/rtorrent.init.conf

#Do not put a space on either side of the equal signs e.g.
# user = user
# will not work
# system user to run as
user="netshadow"

# the system group to run as, not implemented, see d_start for beginning implementation
# group=`id -ng "$user"`

# the full path to the filename where you store your rtorrent configuration
config="`su -c 'echo $HOME' $user`/.rtorrent.rc"

# set of options to run with
options=""

# default directory for screen, needs to be an absolute path
base="`su -c 'echo $HOME' $user`"

# name of screen session
srnname="rtorrent"

# file to log to (makes for easier debugging if something goes wrong)
logfile="/var/log/rtorrentInit.log"
#######################
###END CONFIGURATION###
#######################
PATH=/usr/bin:/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin
DESC="rtorrent"
NAME=rtorrent
DAEMON=$NAME
SCRIPTNAME=/etc/init.d/$NAME

checkcnfg() {
exists=0
for i in `echo "$PATH" | tr ':' '\n'` ; do
if [ -f $i/$NAME ] ; then
exists=1
break
fi
done
if [ $exists -eq 0 ] ; then
echo "cannot find rtorrent binary in PATH $PATH" | tee -a "$logfile" >&2
exit 3
fi
if ! [ -r "${config}" ] ; then
echo "cannot find readable config ${config}. check that it is there and permissions are appropriate" | tee$
exit 3
fi
session=`getsession "$config"`
if ! [ -d "${session}" ] ; then
echo "cannot find readable session directory ${session} from config ${config}. check permissions" | tee -a$
exit 3
fi
}

d_start() {
[ -d "${base}" ] && cd "${base}"
stty stop undef && stty start undef
su -c "screen -ls | grep -sq "\.${srnname}[[:space:]]" " ${user} || su -c "screen -dm -S ${srnname} 2>&1 1>/dev/$
# this works for the screen command, but starting rtorrent below adopts screen session gid
# even if it is not the screen session we started (e.g. running under an undesirable gid
#su -c "screen -ls | grep -sq "\.${srnname}[[:space:]]" " ${user} || su -c "sg \"$group\" -c \"screen -fn -dm -S$
su -c "screen -S "${srnname}" -X screen rtorrent ${options} 2>&1 1>/dev/null" ${user} | tee -a "$logfile" >&2
}

d_stop() {
session=`getsession "$config"`
if ! [ -s ${session}/rtorrent.lock ] ; then
return
fi
pid=`cat ${session}/rtorrent.lock | awk -F: '{print($2)}' | sed "s/[^0-9]//g"`
if ps -A | grep -sq ${pid}.*rtorrent ; then # make sure the pid doesn't belong to another process
kill -s INT ${pid}
fi
}

getsession() {
session=`cat "$1" | grep "^[[:space:]]*session[[:space:]]*=" | sed "s/^[[:space:]]*session[[:space:]]*=[[:spac$
echo $session
}

checkcnfg

case "$1" in
start)
echo -n "Starting $DESC: $NAME"
d_start
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
d_stop
echo "."
;;
restart|force-reload)
echo -n "Restarting $DESC: $NAME"
d_stop
sleep 1
d_start
echo "."
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 1
;;
esac

exit 0


Oder lässt sich die Unterstützung dafür auch irgendwie anders aktivieren?

Grüße :)

Natrium 28.11.2013 16:21

Moin netshadow,
deaktiviere doch einfach die Zertifikatsabfrage, indem Du folgendes in Deiner .rtorrent.rc einfügst:
Code:

network.http.ssl_verify_peer.set=0
LG

Zero111 30.11.2013 04:09

Das funktioniert aber nur bei neueren Versionen von rtorrent

fabs 28.12.2013 19:17

Zitat:

Zitat von BrainBug (Beitrag 80210)
Die rechte der Ordner sind auf 0777

Ich bekomme beim Einloggen auch folgende Fehlermeldung:
WebUI started.
No connection to rTorrent. Check if it is really running. Check $scgi_port and $scgi_host settings in config.php and scgi_port in rTorrent configuration file.



--======================================--
--==
Beitrag erstellt: 02:40 um 21:10 ==--
--==
geantwortet 15.09.2013 auf Beitrag vom 14.09.2013 ==--
--== automatische Beitragszusammenführung ==--
--======================================--


BrainBug schrieb nach 5 Stunden, 29 Minuten und 49 Sekunden:

OK, ich habs soweit erstmal hinbekommen. rTorrent lief nicht.

Jetzt muss ich den Multiuserteil noch irgendwie hin bekommen. Ich musste einiges umbauen, damit es überhaupt läuft.

zb.
Code:

on_start    = link1,"create_link=tied,,.started" on_stop    = link1,"delete_link=tied,,.started" on_finished = link1,"create_link=tied,,.finished" on_erase    = link1,"delete_link=tied,,.finished"
und noch einiges andere. Aber dazu morgen mehr....


Würde mich ja auch interessieren, wie du das umgebaut bekommen hast, damit es funktioniert... :)

D@rk-€vil™ 28.12.2013 19:39

Wie währe es mal mit Dr. Google? ;)

pat 28.12.2013 20:09

Zitat:

Zitat von D@rk-€vil™ (Beitrag 80940)
Wie währe es mal mit Dr. Google? ;)

Haha der war gut:D

fabs 31.12.2013 11:49

War auch dumme Frage, zugegeben, aber war müde und genervt xD
Habe leider Berechtigungsprobleme bei den symlinks. Ohne geht alles einwandfrei. Genau nach Anleitung gemacht, aber läuft einfach nciht. Hat wer n Tipp für mich?
Code:

Webserver user doesn't have read/write/execute access to the torrents directory. You cannot add torrents via ruTorrent

pat 31.12.2013 11:55

kuk mal der erste treffer bei Google

http://code.google.com/p/rutorrent/wiki/ErrorMessages


rechte überall angepasst??
Code:

chmod-R 0777

fabs 31.12.2013 12:04

Zitat:

Zitat von pat (Beitrag 80970)
kuk mal der erste treffer bei Google

http://code.google.com/p/rutorrent/wiki/ErrorMessages


rechte überall angepasst??
Code:

chmod-R 0777


Japp, ls -al vom symlink
lrwxrwxrwx 1 *apacheuser* *apacheuser* 21 Dec 31 12:14 torrents -> _PATH_FILES/_USER

und vom Ziel also _PATH_FILES/_USER
drwxrwxrwt 2 _USER _USER 4096 Dec 31 12:20 _USER

* =! anonymisiert :)

[edit]

Problem solved :)
open_basedir war das Zauberwort - Hätte ich auch letztes Jahr schon drauf kommen können :)


Alle Zeitangaben in WEZ +1. Es ist jetzt 04:17 Uhr.

Powered by vBulletin® Version 3.8.9 (Deutsch)
Copyright ©2000 - 2024, vBulletin Solutions, Inc.