Aktuelle Zeit: Fr 20. Jul 2018, 20:39



Ein neues Thema erstellen Auf das Thema antworten  [ 45 Beiträge ]  Gehe zu Seite Vorherige  1, 2, 3, 4, 5  Nächste
 LS220D Transmission/Optware Problem 
Autor Nachricht
Foren-Benutzer
Foren-Benutzer

Registriert: Do 24. Dez 2015, 14:39
Beiträge: 28
Bilder: 1

Bedankte sich: 2 mal
Erhielt: 2 Danksagungen in 2 Beiträgen

Bedanke dich für den Beitrag 
Beitrag Re: LS220D Transmission/Optware Problem
Code:
[root@LS220D238 ~]# ls -l /etc/rc.d/extensions.d/S92_transmission.sh
lrwxrwxrwx    1 root     root            27 Oct 31  2007 /etc/rc.d/extensions.d/S92_transmission.sh -> /etc/init.d/transmission.sh*


Code:
[root@LS220D238 ~]# cat /etc/rc.d/extensions.d/S92_transmission.sh
#!/bin/sh

if [ -f /etc/nas_feature ] ; then
        . /etc/nas_feature
else
        echo "nas_feature is not found" >&2
        exit 1
fi

if [ "${SUPPORT_BITTORRENT}" != "on" ] || [ "${BITTORRENT_CLIENT}" != "transmission" ]; then
        echo "Transmission is not supported on this model" >&2
        dpkg -r transmission
        rm -rf /etc/rc.d/extensions.d/S92_transmission.sh
        rm -rf /etc/rc.d/extensions.d/K92_transmission.sh
        rm -f /etc/init.d/transmmission.sh
        exit 0
fi

# We don't use dpkg. then we shall use make uninstall cmds.
#if [ "${PRODUCT_SERIES}" == "LS200" ] ; then
#       echo "Bittorrent aumomatically remove on this model" >&2
#       dpkg -r bittorrent
#       exit 0
#fi

umask 000
NAS_FEATURE=/etc/nas_feature
BT_MELCO_CONF=/etc/melco/bittorrent
BT_SETTINGS=settings.json
INITFILES_TGZ=/root/.files/initfile.tar.gz

# load DIR_BASE=/mnt/***/**** from bellow file.
# load bt_status={on|off} from bellow file.
[ -f ${BT_MELCO_CONF} ] && . ${BT_MELCO_CONF}
[ "${bittorrent_dir}" != "" ] && DIR_BASE=${bittorrent_dir}

BT_DIR=/usr
BT_DOG=${BT_DIR}/bin/transmission-daemon
#BT_SET_LANG=${BT_DIR}/bin/buffalo_simple_curl_query_to_set_language
#BT_CACHE_PLACE=/var/run/bittorrent
BT_CACHE_PLACE=/usr/share/transmission
BT_CONF_FILE=${BT_CACHE_PLACE}/trsettings.txt
#BT_WEBUI=${BT_DIR}/webui.zip

update_melconf()
{
        sed -i -e "s%^bittorrent_dir=.*%bittorrent_dir=${1}%g" ${BT_MELCO_CONF}
        if [ $? -ne 0 ] ; then
                echo "config file update failed!!!" >&2
                mv ${BT_MELCO_CONF}.tmp ${BT_MELCO_CONF}
                exit 1
        fi
}

configure()
{
        if [ "${DIR_BASE}" = "" ] ; then
                if [ "${SUPPORT_RAID}" = "on" ] ; then
                        [ ! -f /etc/melco/diskinfo ] && return 1
                        . /etc/melco/diskinfo

                        if [ "${array1}" != "off" -a "${array1}" != "" ] ; then
                                DIR_BASE=/mnt/array1/share
                        elif [ "${array2}" != "off" -a "${array2}" != "" ] ; then
                                DIR_BASE=/mnt/array2/share
                        elif [ "${disk1}" = "normal" ] ; then
                                DIR_BASE=/mnt/disk1/share
                        elif [ "${disk2}" = "normal" ] ; then
                                DIR_BASE=/mnt/disk2/share
                        elif [ "${disk3}" = "normal" ] ; then
                                DIR_BASE=/mnt/disk3/share
                        elif [ "${disk4}" = "normal" ] ; then
                                DIR_BASE=/mnt/disk4/share
                        else
                                return 1
                        fi
                else
                        DIR_BASE=/mnt/disk1/share/
                fi
                update_melconf ${DIR_BASE}
        fi

        if [ ! -d ${DIR_BASE} ] ; then
                init
                echo "bittorrent_dir($bittorrent_dir) is not exist!" >&2
                return 1
        fi

        echo "${DIR_BASE}" |grep "^/mnt/usbdisk" > /dev/null
        if [ $? -eq 0 ] ; then
                cat /proc/mounts |grep "${DIR_BASE}" > /dev/null
                if [ $? -ne 0 ] ; then
                        init
                        echo "bittorrent_dir($bittorrent_dir) is not mount!" >&2
                        return 1
                fi
        fi

        DIR_BT_ROOT=${DIR_BASE}/transmission
        DIR_ACTIVE=${DIR_BT_ROOT}/_active
        DIR_COMP=${DIR_BT_ROOT}
#       DIR_TORRENT=${DIR_BT_ROOT}/_torrent_files

        [ ! -d ${DIR_BT_ROOT} ] && mkdir ${DIR_BT_ROOT} -p
        [ ! -d ${DIR_ACTIVE} ] && mkdir ${DIR_ACTIVE} -p
        [ ! -d ${DIR_COMP} ] && mkdir ${DIR_COMP} -p
#       [ ! -d ${DIR_TORRENT} ] && mkdir ${DIR_TORRENT} -p

        {
                echo "dir_root: ${DIR_BT_ROOT}/"
                echo "dir_active: ${DIR_ACTIVE}/"
                echo "dir_completed: ${DIR_COMP}/"
#               echo "dir_torrent_files: ${DIR_TORRENT}/"
                echo "webui_enable: ut"
                echo "ut_webui_port: ${bittorrent_port:-9090}"
                echo "dht: true"
                echo "lsd: true"
        } >${BT_CONF_FILE}

        if [ -f /etc/melco/${BT_SETTINGS} ]; then
                cp -f /etc/melco/${BT_SETTINGS} ${DIR_BT_ROOT}/
                rm /etc/melco/${BT_SETTINGS}
        fi

        makeSettings;

#       if [ ! -f ${BT_CACHE_PLACE}/`basename ${BT_WEBUI}` ] ; then
#               cp -f ${BT_WEBUI} ${BT_CACHE_PLACE}/
#       fi
}

IsFolderSettingChanged()
{
        local _dir_active=`grep "^dir_active:" ${BT_CONF_FILE}|sed -e "s%.* %%"`
        if grep -q ${_dir_active} ${DIR_BT_ROOT}/${BT_SETTINGS} 2>/dev/null; then
                return 1
        fi

        return 0
}

makeSettings()
{
        if [ ! -d ${DIR_BT_ROOT} ]; then
                mkdir ${DIR_BT_ROOT} -p
        fi
        if [ -f ${DIR_BT_ROOT}/${BT_SETTINGS} ] ; then
                rm -f ${DIR_BT_ROOT}/${BT_SETTINGS}
        fi
        {
                echo "{"
                echo "    \"alt-speed-down\": 50,"
                echo "    \"alt-speed-enabled\": false,"
                echo "    \"alt-speed-time-begin\": 540,"
                echo "    \"alt-speed-time-day\": 127,"
                echo "    \"alt-speed-time-enabled\": false,"
                echo "    \"alt-speed-time-end\": 1020,"
                echo "    \"alt-speed-up\": 50,"
                echo "    \"bind-address-ipv4\": \"0.0.0.0\","
                echo "    \"bind-address-ipv6\": \"::\","
                echo "    \"blocklist-enabled\": true,"
                echo "    \"blocklist-url\": \"http://john.bitsurge.net/public/biglist.p2p.gz\","
                echo "    \"cache-size-mb\": 2,"
                echo "    \"dht-enabled\": false,"
                echo "    \"download-dir\": \"${DIR_BT_ROOT}\","
                echo "    \"download-queue-enabled\": true,"
                echo "    \"download-queue-size\": 5,"
                echo "    \"encryption\": 1,"
                echo "    \"idle-seeding-limit\": 30,"
                echo "    \"idle-seeding-limit-enabled\": false,"
                echo "    \"incomplete-dir\": \"${DIR_ACTIVE}\","
                echo "    \"incomplete-dir-enabled\": true,"
                echo "    \"lpd-enabled\": false,"
                echo "    \"message-level\": 2,"
                echo "    \"peer-congestion-algorithm\": \"\","
                echo "    \"peer-id-ttl-hours\": 6,"
                echo "    \"peer-limit-global\": 200,"
                echo "    \"peer-limit-per-torrent\": 50,"
                echo "    \"peer-port\": 12345,"
                echo "    \"peer-port-random-high\": 65535,"
                echo "    \"peer-port-random-low\": 49152,"
                echo "    \"peer-port-random-on-start\": false,"
                echo "    \"peer-socket-tos\": \"default\","
                echo "    \"pex-enabled\": false,"
                echo "    \"port-forwarding-enabled\": true,"
                echo "    \"preallocation\": 2,"
                echo "    \"prefetch-enabled\": 0,"
                echo "    \"queue-stalled-enabled\": true,"
                echo "    \"queue-stalled-minutes\": 30,"
                echo "    \"ratio-limit\": 3,"
                echo "    \"ratio-limit-enabled\": true,"
                echo "    \"rename-partial-files\": true,"
                echo "    \"rpc-authentication-required\": true,"
                echo "    \"rpc-bind-address\": \"0.0.0.0\","
                echo "    \"rpc-enabled\": true,"
                echo "    \"rpc-password\": \"PASSWORD\","
                echo "    \"rpc-port\": ${bittorrent_port:-9090},"
                echo "    \"rpc-url\": \"/transmission/\","
                echo "    \"rpc-username\": \"admin\","
                echo "    \"rpc-whitelist\": \"127.0.0.1\","
                echo "    \"rpc-whitelist-enabled\": false,"
                echo "    \"scrape-paused-torrents-enabled\": true,"
                echo "    \"script-torrent-done-enabled\": true,"
                echo "    \"script-torrent-done-filename\": \"/mnt/array1/share/downloads/transmission/torrentexpander.sh\","
                echo "    \"seed-queue-enabled\": false,"
                echo "    \"seed-queue-size\": 10,"
                echo "    \"speed-limit-down\": 100,"
                echo "    \"speed-limit-down-enabled\": false,"
                echo "    \"speed-limit-up\": 30,"
                echo "    \"speed-limit-up-enabled\": true,"
                echo "    \"start-added-torrents\": true,"
                echo "    \"trash-original-torrent-files\": false,"
                echo "    \"umask\": 0,"
                echo "    \"upload-slots-per-torrent\": 15,"
                echo "    \"utp-enabled\": true"
                echo "}"
        } > ${DIR_BT_ROOT}/${BT_SETTINGS}
}

WaitBtDie()
{
        local retry_max=5
        local retry_interval=1

        while [ ${retry_max} -gt 0 ]
        do
                ps|grep -v grep |grep ${BT_DOG} > /dev/null
                if [ $? -ne 0 ] ; then
                        break
                fi

                logger -s -t bittorrent -p local0.info "ps : `ps|grep -v grep|grep ${BT_DOG}`"
                killall `basename ${BT_DOG}`
                retry_max=$((${retry_max} - 1))
                sleep ${retry_interval}
        done
        logger -s -t bittorrent -p local0.info "WaitBtDie is finished. ${RETRY_MAX}"
}

StartBT()
{
        if [ "${bittorrent_status}" != "on" ]; then
                echo "bittorrent is off" >&2
                exit 0
        fi


        if ! configure; then
                exit 1
        fi

        # for redmine #28266
        if IsFolderSettingChanged ; then
                logger -s -t bittorrent -p local0.info "Folder setting is changed."

                WaitBtDie

#               rm -rf /etc/melco/transmission-cli
                rm ${DIR_BT_ROOT}/*.json
                rm ${DIR_BT_ROOT}/*.old

                if ! configure; then
                        exit 1
                fi
        fi

        # fix bug #08783 and #152823
        result=`find ${DIR_BT_ROOT} -maxdepth 1 ! -perm -222 | grep -v -e settings.json -e stats.json -e dht.dat`
        if [ "${result}" != "" ] ; then
                chmod -R 777 ${DIR_BT_ROOT} > /dev/null 2>&1 &
        fi

        export LANG=en_US.UTF-8
        (cd ${BT_DIR}/ && ${BT_DOG} -g ${DIR_BT_ROOT})

        # Initial language setting of BitTorrent (In the case of REGION_CODE=JP)
        # lauguage is enlish only. so, we can't change language setting of Transmission.
#       if grep "REGION_CODE=JP" ${NAS_FEATURE}; then
#               if ! grep "bittorrent_init_set_lang=done" ${BT_MELCO_CONF}; then
#                       sleep 1
#                       ${BT_SET_LANG} ja 127.0.0.1 9090
#                       echo "bittorrent_init_set_lang=done" >> ${BT_MELCO_CONF}
#               fi
#       fi
}

StopBT()
{
        WaitBtDie
}

init()
{
        rm /etc/melco/${BT_SETTINGS}
        rm ${DIR_BT_ROOT}/*.json
        rm ${DIR_BT_ROOT}/*.old
        tar zxf ${INITFILES_TGZ} -C / ${BT_MELCO_CONF#/}
}

case $1 in
start)
        StartBT
        ;;
stop)
        StopBT
        ;;
restart)
        StopBT
        sleep 1
        StartBT
        ;;
init)
        StopBT
        init
        StartBT
        ;;
config)
        makeSettings
        ;;
esac

exit 0
[root@LS220D238 ~]#


Mi 11. Okt 2017, 18:54
Profil Persönliches Album 
Dieser Werbeblock wird nur bei Gästen angezeigt
Globaler Moderator

Registriert: Mo 5. Apr 2010, 23:32
Beiträge: 6537
Bilder: 389

Bedankte sich: 174 mal
Erhielt: 849 Danksagungen in 786 Beiträgen

Bedanke dich für den Beitrag 
Beitrag Re: LS220D Transmission/Optware Problem
Code:
/etc/rc.d/extensions.d/S92_transmission.sh stop


Warte 10 Sekunden

Code:
/etc/rc.d/extensions.d/S92_transmission.sh start


Mi 11. Okt 2017, 18:59
Profil Persönliches Album 
Foren-Benutzer
Foren-Benutzer

Registriert: Do 24. Dez 2015, 14:39
Beiträge: 28
Bilder: 1

Bedankte sich: 2 mal
Erhielt: 2 Danksagungen in 2 Beiträgen

Bedanke dich für den Beitrag 
Beitrag Re: LS220D Transmission/Optware Problem
Code:
[root@LS220D238 ~]# /etc/rc.d/extensions.d/S92_transmission.sh stop
bittorrent: ps :  5747 root     /usr/bin/transmission-daemon -g /mnt/array1/share/downloads/transmission
15767 root     /usr/bin/transmission-daemon
bittorrent: WaitBtDie is finished.
[root@LS220D238 ~]# /etc/rc.d/extensions.d/S92_transmission.sh start
bittorrent: Folder setting is changed.
bittorrent: WaitBtDie is finished.
rm: can't remove '/mnt/array1/share/downloads/transmission/*.old': No such file or directory
[root@LS220D238 ~]#



Mi 11. Okt 2017, 19:21
Profil Persönliches Album 
Globaler Moderator

Registriert: Mo 5. Apr 2010, 23:32
Beiträge: 6537
Bilder: 389

Bedankte sich: 174 mal
Erhielt: 849 Danksagungen in 786 Beiträgen

Bedanke dich für den Beitrag 
Beitrag Re: LS220D Transmission/Optware Problem
Mich stört das:
Zitat:
bittorrent: Folder setting is changed.


Mi 11. Okt 2017, 19:32
Profil Persönliches Album 
Globaler Moderator

Registriert: Mo 5. Apr 2010, 23:32
Beiträge: 6537
Bilder: 389

Bedankte sich: 174 mal
Erhielt: 849 Danksagungen in 786 Beiträgen

Bedanke dich für den Beitrag 
Beitrag Re: LS220D Transmission/Optware Problem
Sind alle Ordner vorhanden?
Code:
ls -l /mnt/array1/share/downloads/


Mi 11. Okt 2017, 19:42
Profil Persönliches Album 
Foren-Benutzer
Foren-Benutzer

Registriert: Do 24. Dez 2015, 14:39
Beiträge: 28
Bilder: 1

Bedankte sich: 2 mal
Erhielt: 2 Danksagungen in 2 Beiträgen

Bedanke dich für den Beitrag 
Beitrag Re: LS220D Transmission/Optware Problem
Code:
[root@LS220D238 ~]# ls -l /mnt/array1/share/downloads/
total 20
drwxrwxrwx    4 root     root           134 Sep 28 12:08 XXXXX/
drwxrwxrwx    2 root     root            83 Sep 27 22:28 XXXXX/
drwxrwxrwx    2 root     root            67 Sep 27 19:38 XXXXX/
drwxrwxrwx    3 root     root            48 Sep 28 17:52 XXXXX/
drwxrwxrwx    3 root     root            67 Aug 31 19:51 XXXXX/
drwxrwxrwx    2 root     root          4096 Oct  8 14:49 XXXXX/
drwxrwxrwx    2 root     root            38 Aug 30 21:01 XXXXX/
drwxrwxrwx    2 root     root          4096 Oct 11 19:44 XXXXX/
drwxrwxrwx    2 root     root          4096 Oct  9 17:20 XXXXX/
drwxrwxrwx    3 root     root          4096 Oct  9 17:42 XXXXX/
drwxrwxrwx    6 root     root          4096 Oct 11 19:45 transmission/
[root@LS220D238 ~]#


Scheint also alles da zu sein.


Mi 11. Okt 2017, 19:52
Profil Persönliches Album 
Globaler Moderator

Registriert: Mo 5. Apr 2010, 23:32
Beiträge: 6537
Bilder: 389

Bedankte sich: 174 mal
Erhielt: 849 Danksagungen in 786 Beiträgen

Bedanke dich für den Beitrag 
Beitrag Re: LS220D Transmission/Optware Problem
da fehlt _active
und schon kann er nicht starten


Mi 11. Okt 2017, 19:54
Profil Persönliches Album 
Foren-Benutzer
Foren-Benutzer

Registriert: Do 24. Dez 2015, 14:39
Beiträge: 28
Bilder: 1

Bedankte sich: 2 mal
Erhielt: 2 Danksagungen in 2 Beiträgen

Bedanke dich für den Beitrag 
Beitrag Re: LS220D Transmission/Optware Problem
_active ist in /transmission/ siehe...

Code:
[root@LS220D238 ~]# ls -l /mnt/array1/share/downloads/transmission/
total 376
drwxrwxrwx    4 root     root          4096 Oct 11 19:54 _active/
drwxrwxrwx    2 root     root            26 Mar 10  2017 blocklists/
-rwxrwxrwx    1 root     root           292 Oct  9 16:01 dht.dat*
drwxrwxrwx    2 root     root          4096 Oct 11 19:51 resume/
-rw-------    1 root     root          2307 Oct 11 19:21 settings.json
-rw-------    1 root     root           149 Oct 11 19:51 stats.json
-rwxrwxrwx    1 nobody   nogroup     166250 Aug 29  2016 torrentexpander - Kopie.sh*
-rwxrwxrwx    1 root     root        166250 Oct  9 16:42 torrentexpander.sh*
-rw-rw-rw-    1 root     root           134 Oct 11 19:54 torrentexpander_errors.log
-rwxrwxrwx    1 nobody   nogroup       1849 Oct  7 23:46 torrentexpander_settings - Kopie.ini*
-rwxrwxrwx    1 root     root          1849 Oct 11 19:54 torrentexpander_settings.ini*
drwxrwxrwx    2 root     root          4096 Oct 11 18:50 torrents/
-rwxrwxrwx    1 root     root          8661 Jun 30 13:52 transmission - Kopie.sh*
[root@LS220D238 ~]#


Allerdings meldet torrentexpander nun:

Code:
Your Unrar path is incorrect or permissions are incorrect please edit your torrentexpander_settings.ini file or edit your permissions


Code:
unrar_bin=/opt/bin/unrar
unzip_bin=/usr/bin/unzip


Wohin muss ich da denn jetzt genau verlinken?


Mi 11. Okt 2017, 19:57
Profil Persönliches Album 
Globaler Moderator

Registriert: Mo 5. Apr 2010, 23:32
Beiträge: 6537
Bilder: 389

Bedankte sich: 174 mal
Erhielt: 849 Danksagungen in 786 Beiträgen

Bedanke dich für den Beitrag 
Beitrag Re: LS220D Transmission/Optware Problem
Code:
cat /usr/share/transmission/trsettings.txt


Mi 11. Okt 2017, 20:10
Profil Persönliches Album 
Foren-Benutzer
Foren-Benutzer

Registriert: Do 24. Dez 2015, 14:39
Beiträge: 28
Bilder: 1

Bedankte sich: 2 mal
Erhielt: 2 Danksagungen in 2 Beiträgen

Bedanke dich für den Beitrag 
Beitrag Re: LS220D Transmission/Optware Problem
Code:
[root@LS220D238 ~]# cat /usr/share/transmission/trsettings.txt
dir_root: /mnt/array1/share/downloads/transmission/
dir_active: /mnt/array1/share/downloads/transmission/_active/
dir_completed: /mnt/array1/share/downloads/transmission/
webui_enable: ut
ut_webui_port: 9090
dht: true
lsd: true
[root@LS220D238 ~]#


Mi 11. Okt 2017, 20:12
Profil Persönliches Album 
Beiträge der letzten Zeit anzeigen:  Sortiere nach  

Ein neues Thema erstellen Auf das Thema antworten  [ 45 Beiträge ]  Gehe zu Seite Vorherige  1, 2, 3, 4, 5  Nächste





Suche nach:

Ähnliche Beiträge

Problem mit Transmission auf einer LS220D
Forum: Buffalo Linkstation Pro Duo
Autor: oxygen8
Antworten: 3
Buffalo LS220D
Forum: Buffalo Linkstation Pro Duo
Autor: oxygen8
Antworten: 20
LS220D mit Festplattenfehler
Forum: Buffalo Linkstation Duo
Autor: Harper
Antworten: 7
Linkstation LS220d einrichten
Forum: Buffalo Linkstation Duo
Autor: oxygen8
Antworten: 3
Buffalo Netzfestspeicher LS220D - Netzwerkpfad
Forum: Buffalo Linkstation Pro Duo
Autor: camino
Antworten: 4

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 32 Gäste


Deine Berechtigungen

 Du darfst keine neuen Themen in diesem Forum erstellen.
 Du darfst keine Antworten zu Themen in diesem Forum erstellen.
 Du darfst deine Beiträge in diesem Forum nicht ändern.
 Du darfst deine Beiträge in diesem Forum nicht löschen.
 Du darfst keine Dateianhänge in diesem Forum erstellen.

Gehe zu:  


| NAS-Hilfe.de - die deutsche Buffalo NAS-Hilfe Seite | Mein Blog - Bloggen Querbeet... | Powered by phpBB © phpBB Group. | Deutsche Übersetzung durch phpBB.de | Impressum |