Autostart Transmission 1.5

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
bramschats
Posts: 12
Joined: Wed Jan 14, 2009 6:39 pm

Autostart Transmission 1.5

Post by bramschats »

Hello,

I have an NSLU2 with unslung software 6.10 and have the following problem.

It has taken a wile but i had set up transmission 1.42 installed and
it worked perfectly.

I had to reinstall the slug and now there suddenly is transmission
1.5 and my autostartscript won't work.

i use this script:

vi /opt/etc/init.d/S90transmission

#!/bin/sh

prefix="/opt"

PATH=${prefix}/bin:${prefix}/sbin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=transmission-daemon
CONFIGDIR=/root/.config/transmission-daemon
DAEMON=${prefix}/bin/${NAME}

test -x $DAEMON || exit 0

if [ -z "$1" ] ; then
case `echo "$0" | sed 's:^.*/\(.*\):\1:g'` in
S??*) rc="start" ;;
K??*) rc="stop" ;;
*) rc="usage" ;;
esac
else
rc="$1"
fi

case "$rc" in
start)
echo "Starting Torrent client: $NAME"
nice $DAEMON -g ${CONFIGDIR}
;;
stop)
#if [ -n "`pidof $NAME`" ]; then
echo "Stopping Torrent client: $NAME"
killall $NAME 2> /dev/null
#fi
;;
restart)
"$0" stop
sleep 1
"$0" start
;;
*)
echo "Usage: $0 (start|stop|restart|usage)"
;;
esac

exit 0

Then make it executable and create a symbolic link:

chmod +x /opt/etc/init.d/S90transmission
ln -s /opt/etc/init.d/S90transmission /opt/etc/init.d/K90transmission

but when i try to start i get this message:
/opt/etc/init.d/K90transmission: /opt/etc/init.d/K90transmission: 38:
Syntax err
or: "(" unexpected

what am i doing wrong, can someone please help. i followed procedure
conform http://mybookworld.wikidot.com/transmission.

thanks in advance.
Post Reply