Difference between revisions of "ByRequest - Mediaserver for Tivos"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
Line 60: Line 60:
 
Just in case the attachment didn't work here's the script:
 
Just in case the attachment didn't work here's the script:
  
 +
###########cut starting at the following line
 +
#!/bin/bash
 +
#
 +
# byRequest This shell script takes care of starting and stopping
 +
# the byRequest TiVo Media Server.
  
<nowiki>Insert non-formatted text here</nowiki>###########cut starting at the following line
+
PROG=/usr/local/bin/byRequest
<nowiki>#!/bin/bash
+
<nowiki>#
+
<nowiki># byRequest This shell script takes care of starting and stopping
+
<nowiki># the byRequest TiVo Media Server.
+
  
<nowiki>PROG=/usr/local/bin/byRequest
+
RETVAL=0
  
<nowiki>RETVAL=0
+
start() {
 +
[ -x $PROG ] || exit 0
  
<nowiki>start() {
+
# Start daemons.
<nowiki>[ -x $PROG ] || exit 0
+
echo -n $"Starting byRequest TiVo Media Server: "
 +
$PROG /etc/byRequest.conf -preload
 +
RETVAL=$?
 +
echo
 +
return $RETVAL
 +
}
  
<nowiki># Start daemons.
+
stop() {
<nowiki>echo -n $"Starting byRequest TiVo Media Server: "
+
echo -n $"Shutting down byRequest TiVo Media Server "
<nowiki>$PROG /etc/byRequest.conf -preload
+
/sbin/start-stop-daemon --stop --quiet --exec $PROG
<nowiki>RETVAL=$?
+
RETVAL=$?
<nowiki>echo
+
echo
<nowiki>return $RETVAL
+
return $RETVAL
<nowiki>}
+
}
  
<nowiki>stop() {
+
# See how we were called.
<nowiki>echo -n $"Shutting down byRequest TiVo Media Server "
+
case "$1" in
<nowiki>/sbin/start-stop-daemon --stop --quiet --exec $PROG
+
start)
<nowiki>RETVAL=$?
+
start
<nowiki>echo
+
;;
<nowiki>return $RETVAL
+
stop)
<nowiki>}
+
stop
 +
;;
 +
restart|reload)
 +
stop
 +
sleep 1
 +
start
 +
RETVAL=$?
 +
;;
 +
*)
 +
echo $"Usage: $0 {start|stop|restart}"
 +
exit 1
 +
esac
  
<nowiki># See how we were called.
+
exit $RETVAL
<nowiki>case "$1" in
+
<nowiki>start)
+
<nowiki>start
+
<nowiki>;;
+
<nowiki>stop)
+
<nowiki>stop
+
<nowiki>;;
+
<nowiki>restart|reload)
+
<nowiki>stop
+
<nowiki>sleep 1
+
<nowiki>start
+
<nowiki>RETVAL=$?
+
<nowiki>;;
+
<nowiki>*)
+
<nowiki>echo $"Usage: $0 {start|stop|restart}"
+
<nowiki>exit 1
+
<nowiki>esac
+
 
+
<nowiki>exit $RETVAL
+
 
+
===[[Information/MIPSelOverview|LS2]] ([[w:MIPS_architecture|MIPSel]])===
+
 
+
 
+
 
+
==[[FreeLink|FreeLink]]==
+
 
+
 
+
{{Stubs}}</nowiki>
+

Revision as of 03:44, 9 April 2007


Contents

About

Prerequisites

  1. OpenLink or FreeLink
  2. Development Tools

Installation

OpenLink

LS1/HG/HS (PowerPC)

I copied this from here: http://www.tivocommunity.com/tivo-vb/archive/index.php/t-280030.html

Warning: you need some basic linux skills and command line access to your linkstation before you begin. For instructions on command line or telnet access to your linkstation see linkstationwiki.org.

What you need:

1) ppctools or mipstools depending upon your linkstation version from LinkStationwiki.org

2) LibJpeg from: www.jpegsrc.v6b.tar.gz at ijg.org/files

  • do the ususal ./configure; make; make install.
  • You must also make install-lib

3) ImageMagick-6.2.5-5.tar.gz from www.imagemagick.org/script/download.php

  • again, do the usual ./configure; make; make install.

4) byRequest tivo HMO server at sourceforge.net/projects/byrequest

  • edit the Makefile to set DESTDIR to the location where you want the media server installed. I recommend /usr/local/bin
  • do make; make install
  • copy byRequest.conf to /etc; edit the image: and audio: lines to the locations where you store your files. Note: your shares are subfolders of the /mnt folder. I recommend commenting out the virtual: line as the virtual audio folders (for artist, album and title) run very very slow on the Linkstation.
  • start the server with

/usr/local/bin/byRequest /etc/byRequest.conf -preload

  • You should set up a script in init.d to start/stop the byRequest daemon and the appropriate symlinks in /rc.d/rc2.d (start) and rc0.d and rc6.d (both stop or kill) in order to start the daemon when the Linkstation restarts.


You'll also need to make it into an executable with the following command: chmod +x /etc/init.d/byRequest

Now you'll need to set up the symlinks:

cd /etc/rc.d/rc2.d ln -s ../init.d/byRequest S93byRequest

cd /etc/rc.d/rc0.d ln -s ../init.d/byRequest K15byRequest

cd /etc/rc.d/rc6.d ln -s ../init.d/byRequest K15byRequest


Just in case the attachment didn't work here's the script:

                      1. cut starting at the following line
  1. !/bin/bash
  2. byRequest This shell script takes care of starting and stopping
  3. the byRequest TiVo Media Server.

PROG=/usr/local/bin/byRequest

RETVAL=0

start() { [ -x $PROG ] || exit 0

  1. Start daemons.

echo -n $"Starting byRequest TiVo Media Server: " $PROG /etc/byRequest.conf -preload RETVAL=$? echo return $RETVAL }

stop() { echo -n $"Shutting down byRequest TiVo Media Server " /sbin/start-stop-daemon --stop --quiet --exec $PROG RETVAL=$? echo return $RETVAL }

  1. See how we were called.

case "$1" in start) start

stop) stop

restart|reload) stop sleep 1 start RETVAL=$?

  • )

echo $"Usage: $0 {start|stop|restart}" exit 1 esac

exit $RETVAL