Einzelnen Beitrag anzeigen
Alt 23.07.2012, 23:27   #9
obelixpro
Neuling
Punkte: 61, Level: 1 Punkte: 61, Level: 1 Punkte: 61, Level: 1
Levelaufstieg: 22% Levelaufstieg: 22% Levelaufstieg: 22%
Aktivität: 0% Aktivität: 0% Aktivität: 0%
 
Benutzerbild von obelixpro
 
Registriert seit: 22.07.2012
Beitr?ge: 5
Abgegebene Danke: 0
Erhielt 0 Danke für 0 Beiträge
Themenstarter Themenstarter
Downloads: 0
Uploads: 0
Nachrichten: 0
Renommee-Modifikator:
0 obelixpro befindet sich auf einem aufstrebenden Ast
Standard

das mag ja alles richtig sein was du schreibst ... normalerweise hatte ich dafür auch immer jemanden der mir geholfen hat und erklährt hat ... der hatte mir dann mal ein pdf tut fertig gemacht und mir mal alles gezeigt ... was bis jetzt auch immer geklappt hat ...nun hab ich einfach nur das selbe wiederholt wie sonst auch nur halt mit den updates von den rtorrent sachen ... naja und dadurch läuft es jetzt nicht und da wollt ich doch nur nachfragen ob mir jemand was dazu sagen kann

wenn derjenige momentan vorerst nicht da ist was soll ich machen ? server auslaufen lassen oder lieber selbst machen wie sonst auch ? dann frag ich doch lieber mal nach ist doch dann mein problem wenn was passiert ...



--======================================--
--==
Beitrag erstellt: 00:27 um 00:06 ==--
--==
geantwortet auf Beitrag vom ==--
--== automatische Beitragszusammenführung ==--
--======================================--


obelixpro schrieb nach 20 Minuten und 53 Sekunden:

das ist mein rtorrent init-Script und in Zeile 124 soll etwas falsch sein hm

Klicke hier, um den gesamten Text zu sehen
Code:
#!/bin/bash
# Start / Stop rtorrent
### BEGIN INIT INFO
# Provides: rtorrent
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start rtorrent as a daemon
### END INIT INFO
. /lib/lsb/init-functions
#############
###<Notes>###
#############
# This script depends on dtach.
# To access to rtorrent, use :
# dtach -a /var/lib/rtorrent/rtorrent.dtach -r winch
##############
###</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="www-data"
user=$2
if [ -z $user ] ; then
exit 0
fi
# the system group to run as, not implemented, see d_start for beginning implementation
group=`id -ng "$user"`
#group="www-data"
# the full path to the filename where you store your rtorrent configuration
config="/home/rtorrent/users/${user}/rtorrent.rc"
# default directory for screen, needs to be an absolute path
#base="/home/${user}"
base="/var/run/screen"
# name of screen session
srnname="rtorrent_${user}"
# file to log to (makes for easier debugging if something goes wrong)
logfile="/home/rtorrent/rtorrent.log"
#######################
###END CONFIGURATION###
#######################
PATH=/usr/bin:/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin
DESC="rtorrent_${user}"
NAME=rtorrent
DAEMON=$NAME
SCRIPTNAME=/etc/init.d/${NAME}
RTPIDFILE=/var/run/${NAME}_${user}.pid
DTPIDFILE=/var/run/dtach-${NAME}_${user}.pid
OPTIONS="-n /home/rtorrent/users/${user}/${NAME}.dtach /usr/local/bin/rtorrent -n -o import=$
{config}"
#Functions
checkconfig() {
exists=0
for i in `echo "$PATH" | tr ':' '\n'` ; do
if [ -f $i/$DAEMON ] ; then
exists=1
appdir=$i
apppath=$i/$DAEMON
break
fi
done
if ! [ -x "$apppath" ] ; then
echo "cannot find executable rtorrent binary in PATH $appdir" | tee -a "$logfile" >&2
exit 3
fi
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 -a "$logfile" >&2
exit 3
fi
session=`getsession "$config"`
if ! [ -d "${session}" ] ; then
echo "cannot find readable session directory ${session} from config ${config}. check
permissions" | tee -a "$logfile" >&2
exit 3
fi
}
getsession() {
session=`awk '/^session/{print($3)}' "$config"`
echo $session
}
makepidfiles() {
#make sure files don't exist before we start
if [ -r "$DTPIDFILE" ] ; then
rm  -f "$DTPIDFILE"
fi
if [ -r "$RTPIDFILE" ] ; then
rm  -f "$RTPIDFILE"
fi
dtpid=`ps -u ${user} | egrep dtach | awk '!/egrep/' | awk '{print($1)}'`
rtpid=`ps -u ${user} | egrep ${DAEMON} | awk '!/egrep/' | awk '{print($1)}'`
if [ -z $rtpid ] ; then
echo "Finding PID(s) failed"
exit 3
else
echo $rtpid > $RTPIDFILE
echo $dtpid > $DTPIDFILE
fi
}
start() {
log_daemon_msg "Starting daemon-ized dtach session for" "$NAME"
echo "starting daemon-ized dtach session for ${NAME}; command = start-stop-daemon --start
--chuid ${user} --pidfile $DTPIDFILE --startas /usr/bin/dtach -- ${OPTIONS}" > "$logfile"
start-stop-daemon --start --chuid ${user} --pidfile "$DTPIDFILE" --startas /usr/bin/dtach --
$OPTIONS
if [ $? != 0 ]; then
log_end_msg 1
exit 1
else
makepidfiles
log_end_msg 0
fi
}
stop() {
SIGNAL="TERM"
if [ -f "$RTPIDFILE" ]; then
log_daemon_msg "Stopping daemon-ized dtach session for" "$NAME"
start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile "$RTPIDFILE"
if [ $? = 0 ]; then
start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile "$DTPIDFILE"
if [ $? = 0 ]; then
rm  -f "$DTPIDFILE"
fi
log_end_msg 0
rm  -f "$RTPIDFILE"
else
SIGNAL="KILL"
log_daemon_msg "Couldn't stop $NAME daemon gracefully. Trying to $SIGNAL" "$NAME
instead"
#Trying to find the PIDs again
makepidfiles
start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile "$RTPIDFILE"
if [ $? = 0 ]; then
start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile "$DTPIDFILE"
if [ $? = 0 ]; then
rm  -f "$DTPIDFILE"
fi
rm  -f "$RTPIDFILE"
log_daemon_msg "$NAME has been killed. This is not optimal, so please check if there
were failures during session startup."
log_end_msg 0
else
log_daemon_msg "Script could not kill"" $NAME. Please try stopping the dtach session
manually"
log_end_msg 1
fi
fi
fi
}
#End Functions
#Script
checkconfig
case "$1" in
start)
start
;;
stop)
stop
;;
*)
echo "Usage: ${SCRIPTNAME} {start|stop} {USER}" >&2
exit 1
;;
esac
exit 0

Ge?ndert von Cerberus (27.07.2012 um 23:42 Uhr)
obelixpro ist offline   Mit Zitat antworten Nach oben