#Change TMP Folder to have more space!
TMPFOLDER=â/shares/Public/tmpCompileâ
TMP=$TMPFOLDER
TEMP=$TMPFOLDER
TMPDIR=$TMPFOLDER
export TMPDIR TMP TEMP
clear
echo âWelcome! Compile and Install Transmission 2.84â
echo âCreated by Proglin v2015-09-10â
echo " Last Update: v2019-06-13"
echo âALWAYS back up your data before proceeding.â
echo âThis script was only tested with MyBookLive firmware 02.43.10-048â
printf "Your firmware version is: â;tail -1 /var/log/version.log
echo ââ
echo âNOTE from Author: I have not MyBookLive since 2016. Changes after 2016 are basedâ
echo " on user forum comments.â
echo ââ
echo âWe are going to change some configs to install Tranmissionâ
read -p âThis process takes around 30 minutes. Are you sure? (Y/N)â -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ [1]$ ]]
then
echo âOK. Exiting.â
exit
fi
mkdir -p $TMPFOLDER
if [[ $? > 0 ]]
then
echo âThe command failed, exiting.â ; exit
fi
rm -f /var/lib/dpkg/info/wd-nas.*
cp /etc/apt/sources.list $TMPFOLDER/sources.list.bak
echo ââ
printf â1/22 Configuring repositories⌠(part 1/3)â
APTSOURCESOLD=â#Modified to install Transmission (old packages)
deb Index of /debian squeeze main
deb-src Index of /debian squeeze main #debIndex of /debian wheezy main #deb-srcIndex of /debian wheezy main\nâ
printf â$APTSOURCESOLDâ > /etc/apt/sources.list
apt-get -qq clean
apt-get -qq update >/dev/null 2>&1
if [[ $? > 0 ]]
then
echo âThe command failed, exiting.â ; exit
else
echo " OK!"
fi
printf â2/22 Installing packages⌠(part 1/7)â
apt-get -q -y --force-yes --allow-unauthenticated -o Dpkg::Options::=ââforce-confdefâ -o Dpkg::Options::=ââforce-confoldâ -o Dpkg::Options::=ââforce-overwriteâ install tar >/dev/null 2>&1
if [[ $? > 0 ]]
then
echo âThe command failed, exiting.â ; exit
else
echo " OK!"
fi
printf â7/22 Configuring repositories⌠(part 2/3)â
APTSOURCESNEW=â#Modified to install Transmission (new packages) #debIndex of /debian squeeze main #deb-srcIndex of /debian squeeze main
deb Index of /debian wheezy main
deb-src Index of /debian wheezy main\nâ
printf â$APTSOURCESNEWâ > /etc/apt/sources.list
apt-get -qq clean
apt-get -qq update 2>/dev/null
if [[ $? > 0 ]]
then
echo âThe command failed, exiting.â ; exit
else
echo " OK!"
fi
printf â9/22 Configuring repositories⌠(part 3/3)â
APTSOURCESOLD=â#Modified to install Transmission (old packages)
deb Index of /debian squeeze main
deb-src Index of /debian squeeze main #debIndex of /debian wheezy main #deb-srcIndex of /debian wheezy main\nâ
printf â$APTSOURCESOLDâ > /etc/apt/sources.list
apt-get -qq clean
apt-get -qq update >/dev/null 2>&1
if [[ $? > 0 ]]
then
echo âThe command failed, exiting.â ; exit
else
echo " OK!"
fi
do_start()
{
# Export the configuration/web directory, if set
if [ -n â$TRANSMISSION_HOMEâ ]; then
export TRANSMISSION_HOME
fi
if [ -n â$TRANSMISSION_WEB_HOMEâ ]; then
export TRANSMISSION_WEB_HOME
fi
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --chuid $USERNAME --start --pidfile $PIDFILE --make-pidfile \
--exec $DAEMON --background --test -- -f $TRANSMISSION_ARGS > /dev/null \
|| return 1
start-stop-daemon --chuid $USERNAME --start --pidfile $PIDFILE --make-pidfile \
--exec $DAEMON --background -- -f $TRANSMISSION_ARGS \
|| return 2
}
Function that stops the daemon/service
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --retry=TERM/10/KILL/5 --pidfile $PIDFILE --exec $DAEMON
RETVAL=â$?â
[ â$RETVALâ = 2 ] && return 2
# Wait for children to finish too if this is a daemon that forks
# and if the daemon is only ever run from this initscript.
# If the above conditions are not satisfied then add some other code
# that waits for the process to drop all resources that could be
# needed by services started subsequently. A last resort is to
# sleep for some time.
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
[ "$?" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
}
case â$1â in
start)
echo âStarting $DESCâ â$NAMEâŚâ
do_start
case â$?â in
0|1) echo " Starting $DESC $NAME succeeded" ;;
*) echo " Starting $DESC $NAME failed" ;;
esac
;;
stop)
echo âStopping $DESC $NAMEâŚâ
do_stop
case â$?â in
0|1) echo " Stopping $DESC $NAME succeeded" ;;
*) echo " Stopping $DESC $NAME failed" ;;
esac
;;
restart|force-reload)
#
# If the âreloadâ option is implemented then remove the
# âforce-reloadâ alias
#
echo âRestarting $DESC $NAMEâŚâ
do_stop
case â$?â in
0|1)
do_start
case â$?â in
0|1) echo " Restarting $DESC $NAME succeeded" ;;
*) echo " Restarting $DESC $NAME failed: couldnât start $NAME" ;;
esac
;;
*)
echo " Restarting $DESC $NAME failed: couldnât stop $NAME" ;;
esac
;;
*)
echo âUsage: $SCRIPTNAME {start|stop|restart|force-reload}â >&2
exit 3
;;
esac
EOF
#Setting TRANSMISSION to auto startup
printf â19/22 Configuring TRANSMISSION to auto startupâ
printf â$INITDâ > /etc/init.d/transmission-daemon
chmod +x /etc/init.d/transmission-daemon
chown root:root /etc/init.d/transmission-daemon #Adding autostart to transmission
update-rc.d transmission-daemon defaults >/dev/null 2>&1
if [[ $? > 0 ]]
then
echo âThe command failed, exiting.â ; exit
else
echo " OK!"
fi
#Starting TRANSMISSION
printf â20/22 Configuring TRANSMISSION settings.jsonâ
/etc/init.d/transmission-daemon start >/dev/null 2>&1
if [[ $? > 0 ]]
then
echo âThe command failed, exiting.â ; exit
fi
#Wait transmission to create config files structure
sleep 5
/etc/init.d/transmission-daemon stop >/dev/null 2>&1
if [[ $? > 0 ]]
then
echo âThe command failed, exiting.â ; exit
fi
miniDLNA uses Lib6 and Transmission uses it to, but I think it might run without problem. I´ve never tested.
Transmission runs smooth. No problem using with regular access to MBL files. Since I compiled it, I´m downloading torrents. My last version (2.82), as post above said, go to sleep normally if there is no torrents working. I can tell you after my torrents finish
Really nice guide! Everything seems to work just fine. I can access transmission web interface through my browser (chrome) on my PC but I canât seem to access it though my phone.
When I type in http://mybooklive:9091 in my phoneâs browser (chrome) all I get is âERR_NAME_NOT_RESOLVEDâ.
Is there anyway to solve this? It Would be nice to add torrentâs through your phone. I have used many remote torrent apps but no one seems to be able to let me choose the download paths.
When I type in http://mybooklive:9091 in my phoneâs browser (chrome) all I get is âERR_NAME_NOT_RESOLVEDâ.
Is your phone on the local network or on teh celluar network? Most likley the latter, so how could it access an internal IP address? it canât. You need to setup remote access - which involves port forwarding and a static external IP or at least a dydns.
As wdlive76 said you need to check if you are using your local network. Otherwise you will need to make it public over the internet (It isn´t trivial to do)
BTW I have never tried to access directly http://mybooklive:9091 from my mobile. I use this free app:
You can change this values using client web interface, but theyâll be gone every time that you reboot you MBL. To make it persitent you need to follow the link above. (stop transmission, edtit file, start transmission)
Thanks for the guide! However, Iâm having problems using the script - I get a âcommand not foundâ error several times when running it - including on lines 45, 52, 70, 79, 88, 97, 106 (amongst many others) so it basically seems to have a problem with the âIfâ command. What could be the problem?
Hi Proglin - thanks for the help! It turned out to be an issue with spaces - apparently there needed to be spaces after square brackets at the beginning of the statements, so âif [[$REPLY =~ [1]$ ]]â needed to be âif [[ $REPLY =~ [2]$ ]]â. Having gone through the whole script and changed them all it now works fine! Not sure why that has been a problem for me and nobody else but discovering that has also helped me with a couple of other scripts that werenât working.
That explains another problem Iâm having - other scripts/bits of code that Iâve been trying to copy and paste from this forum have also not been parsed correctly, like some of them appear all on one line, with no carriage returns/paragraph breaks. For example, Iâve been trying to setup Couch Potato (to use with Transmission) using this guide here - [GUIDE] CouchPotato V2 on MBL
And I get to the step where you create the startup script and it says âPaste thisâ but then everything is all on one line, so it doesnât work. Iâve tried parsing it myself but I donât understand it well enough to get it exactly right. It did occur to me that it might just be my PC or browser but if the forum has changed software since these guides were written then that must be the cause!
Yes can we make a stink about this issue please because it caused me to waste a lot of time, and i still havenât got couchpotato or transmission auto-starting! Cheers