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

  • AtHoS

    nagyúr

    Sziasztok!

    Egy ARM bázisú Asus RT-AC68U routerre ezen leírás alapján felraktam egy Debian weezy-t HOW TO INSTALL DEBIAN WHEEZY - ARM

    Majd ezt követően ezen leírást követve megoldottam, hogy Debian-ba belépve root felhasználóval elinduljon az rtorrent és ruTorrent kapcsolódjon hozzá How to Install and Configure: ruTorrent, rTorrent, Libtorrent, XMLRPC, Screen (Debian 7 Wheezy)

    Viszont az alap optware rendszerből az S99debian szkripttel az rtorrent nem indul el.
    Kipróbáltam többféle rtorrent indító szkriptet is, de egyikkel sem tudtam kívülről indítani az rtorrent-et

    Jelenleg ez van beüzemelve:
    #!/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

    Viszont ezt a hibaüzenetet kapom vissza:
    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#

    Az apache elindul, ruTorrent oldalát el is érem, de ugye maga az rtorrent nem indul el. Ilyen hibaüzenetet akkor kaptam debian-ba lépve kézzel indítva az rtorrent-et, míg át nem írtam a USER változó értékét root-ra. root-ként futtatva simán elindul az rtorrent kézzel indítva debian-ba lépve

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