Keresés

Új hozzászólás Aktív témák

  • AtHoS

    nagyúr

    válasz r0by #809 üzenetére

    S99debian-nal elindul neked az rtorrent is rendesen?
    Nálam csak kiírja a debianos rtorrent script a tökéletes indítás üzeneteit, de maga az rtorrent nem indul el.Ha SSH-n belépek és úgy mászok be kézzel debianba, onnan viszont gond nélkül elindul.

    Több rtorrent scripttel is próbálkoztam, mindegyiknél ugyanez volt a végeredmény. Az egyik ilyen rtorrent script-nél S99deban-ból történő indításnál jött egy hibaüzenet

    admin@RT-AC68U:/tmp/home/root# /opt/etc/init.d/S99debian start
    Starting chroot'ed Debian services...
    [ ok ] Starting web server: apache2.
    Starting rtorrent: rtorrentNo screen session found.
    .
    Done.
    admin@RT-AC68U:/tmp/home/root#

    Ez volt az indító script, ami visszadobta a hibaüzenetet:
    #!/bin/bash
    ### BEGIN INIT INFO
    # Provides: rtorrent
    # Required-Start: $remote_fs $syslog
    # Required-Stop: $remote_fs $syslog
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # Short-Description: Start daemon at boot time
    # Description: Enable service provided by daemon.
    ### END INIT INFO#############
    ###<Notes>###
    #############
    # This script depends on screen.
    # For the stop function to work, you must set an
    # explicit session directory using absolute paths 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.
    # If you are running multiple instances of rtorrent,
    # all options should be made respective to one another. so the first option for
    # config should be related to the same first option for options.
    ##############
    ###</Notes>###
    ##############


    #######################
    ##Start Configuration##
    #######################
    # system user to run as (can only use one)
    user="root"

    # config file(s) separate multiple with newlines
    config="/opt/rtorrent/.rtorrent.rc"

    #set of options to run with each instance, separated by a new line
    options=""
    # Examples:
    # starts one instance, sourcing both .rtorrent.rc and .rtorrent2.rc
    # options="-o import=~/.rtorrent2.rc"
    # starts two instances, ignoring .rtorrent.rc for both, and using
    # .rtorrent2.rc for the first, and .rtorrent3.rc for the second
    # we do not check for valid options
    # options="-n -o import=~/.rtorrent2.rc
    # -n -o import=rtorrent3.rc"

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

    # name of screen session, no whitespace allowed
    srnname=rtorrent
    #######################
    ###END CONFIGURATION###
    #######################
    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    DESC="rtorrent"
    NAME=rtorrent
    DAEMON=/usr/bin/$NAME
    SCRIPTNAME=/etc/init.d/$NAME

    # Gracefully exit if the package has been removed.
    test -x $DAEMON || exit 0

    chmod 700 -R /var/run/screen/S-root
    chmod 700 -R /var/run/screen/S-rtorrent

    checkcnfg() {
    OLDIFS="$IFS"
    IFS=$'\n'
    for i in $config ; do
    session=$(cat "$i" | grep "^[[:space:]]*session" | sed "s/^[[:space:]]*session[[:space:]]*=[[:space:]]*//")
    if ! [ -r $i ] ; then
    echo "cannot find readable config $i. check that it is there and permissions are appropriate">&2
    exit 3
    elif ! [ -r $session ] ; then
    echo "cannot find readable session directory $i. check permissions">&2
    exit 3
    fi
    done
    IFS="$OLDIFS"
    }

    d_start() {
    [ -d "$base" ] && cd "$base"
    stty stop undef && stty start undef
    su -c "screen -ls | grep "\.${srnname}[[:space:]]" > /dev/null" $user || su -c "screen -dm -S $srnname" $user
    OLDIFS="$IFS"
    IFS=$'\n'
    if [ -z "$options" ] ; then
    sleep 3
    su -c "screen -S $srnname -X screen rtorrent" $user
    else
    for option in $options ; do
    sleep 3
    su -c "screen -S $srnname -X screen rtorrent $option" $user
    done
    fi
    IFS="$OLDIFS"
    }

    d_stop() {
    OLDIFS="$IFS"
    IFS=$'\n'
    for i in $config ; do
    session=$(cat "$i" | grep "^[[:space:]]*session" | sed "s/^[[:space:]]*session[[:space:]]*=[[:space:]]*//")
    pid=$(cat ${session}/rtorrent.lock | sed "s/[^0-9]//g")
    # make sure the pid doesn't belong to another process
    # skip the pid otherwise
    if ps -A | grep ${pid}.*rtorrent > /dev/null ; then
    kill -s INT $pid
    fi
    done
    IFS="$OLDIFS"
    }

    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

    bár látom, hogy az Options változónak meg kellett volna adni a .rc útvonalát, mivel alapból nem találja

    Amúgy beraktam a post-mount Jffs scriptbe az S99debian indítását, viszont nem igazán szoktam magamtól újraindítgatni, így nem lett tesztelve, de az előbbiekből kiindulva nálam az rtorrent úgysem indul el.
    Előbb meg kellene oldani, hogy a kézzel indított S99debian rendben elindítsa az apache és rtorrent szolgáltatásokat, utána lenne csak értelme azzal foglalkozni újraindításnál is minden redben történik-e

    Nálam Samba-n 50 MB/s magasságában szépen megy a másolás, legalábbis a router irányába mindenképpen. NAS nak használt winyóra pakoltam pár száz GB-ot. FTP-vel is hasonló tempóban pakolta fel az adatokat.

    Szerk.
    kezo0

    Asus weboldal nálam szépen kínálja W8 64bit-et választva
    "29.42 MBytes 2014/12/30 update"

    [ Szerkesztve ]

    read-only mode on the forum

Új hozzászólás Aktív témák