PDA

View Full Version : galleon on linux


alansplace
08-20-2006, 02:22 PM
i've installed galleon 2.3 on pclinuxos 2005 and found the server did not load as a service (as i expected it would) and since i want it to load on startup i added, at the bottom of my rc.local file, these lines:

cd /home/alan/galleon-unix-2.3.0/bin
./run.sh &

which starts the galleon server successfully, but is a bit messy as the startup messages from galleon appear at my login prompt. when it's done i can clear the mess on the display so i can login by just one swipe of the 'enter' key, but it seems inelegant.

does anyone have a a better/different solution?
--
Alan :D

windracer
08-20-2006, 03:03 PM
I forget where/who I got this from, but here's a script you can put into your /etc/init.d directory (just name it galleon):

#!/bin/sh
# Source function library.
if [ -f /etc/init.d/functions ] ; then
. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
. /etc/rc.d/init.d/functions
else
exit 0
fi

case "$1" in
start)
echo "Starting Galleon TiVo HME server:"
cd /usr/share/galleon/bin; ./run.sh &
;;
stop)
echo "Stopping Galleon TiVo server:"
rc=`pkill -HUP -f galleon`
echo "Done"
;;
restart)
stop
sleep 10
start
;;
*)
echo "Usage: /etc/init.d/galleon {start|stop|restart}"
exit 1
;;
esac


(Change the directories as needed for your environment)

Then, you can create the standard symbolic links under the different run levels to automatically start and stop Galleon during boot/shutdown:

I put this under rc3.d:
lrwxrwxrwx 1 root root 19 Jan 25 2006 S98galleon -> /etc/init.d/galleon*


And this under rc6.d:
lrwxrwxrwx 1 root root 19 Jan 25 2006 K03galleon -> /etc/init.d/galleon*

alansplace
08-20-2006, 03:19 PM
I forget where/who I got this from, but here's a script you can put into your /etc/init.d directory (just name it galleon):

#!/bin/sh
# Source function library.
if [ -f /etc/init.d/functions ] ; then
. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
. /etc/rc.d/init.d/functions
else
exit 0
fi

case "$1" in
start)
echo "Starting Galleon TiVo HME server:"
cd /usr/share/galleon/bin; ./run.sh &
;;
stop)
echo "Stopping Galleon TiVo server:"
rc=`pkill -HUP -f galleon`
echo "Done"
;;
restart)
stop
sleep 10
start
;;
*)
echo "Usage: /etc/init.d/galleon {start|stop|restart}"
exit 1
;;
esac


(Change the directories as needed for your environment)

Then, you can create the standard symbolic links under the different run levels to automatically start and stop Galleon during boot/shutdown:

I put this under rc3.d:
lrwxrwxrwx 1 root root 19 Jan 25 2006 S98galleon -> /etc/init.d/galleon*


And this under rc6.d:
lrwxrwxrwx 1 root root 19 Jan 25 2006 K03galleon -> /etc/init.d/galleon*real nice, thanks a bunch! and it reminds me that it makes more sense :eek: to put the galleon in '/usr/share' than in my home, duh!!
--
Alan :D