Hello friends, I've ridden it a download server with an old pc (download legal things clear, and I have in / etc / init.d / a bash "transmission.sh" which contains the following
Well, when I start the pc, I see that you run the bash, but something I'm doing wrong, because the initial, I skip the aid of transmission-daemon, as if not swallow the variables, if you copy it and stick it in a terminal and execute it on my own it works, I have something wrong, something has to be quoted or something.
Does the script start with #!/Bin/sh or #!/bin/sh ? If it's Bin and not bin, the it won't work at all. Also you need to set the script to executable with chmod +x transmission.sh
This unimportant though, you could probably just add the transmission-daemon line to your local.sh in Menu-->System Tools--->Control Box--->Initialization and click the button next to "Add local commands" and add in transmission-daemon -p 9091 -a * -t -u hello -v hello -w /media/hdd01 in there.
Thanks for the help, start bash with #!/bin/sh and has execute permissions.
I set it in local.sh Escript, but dont work, if I put a script "prueba.sh" "in local.sh" : echo "hello"> /root/Hello.txt, it works, but the script transmission.sh does not work.
If I run "transmission.sh" manually from console "sh transmission.sh" does not work, show the help of transmission, but if I copy / paste the content in the console, if it works
Have you tried adding just: transmission-daemon -p 9091 -a * -t -u hello -v hello -w /media/hdd01 to the local.sh file? That way it does the same as what transmission.sh file would do, only it runs the command in local.sh instead.
Here is how my local.sh looks to give you the idea: #!/bin/sh # /etc/init.d/local.sh - Local startup commands. # # All commands here will be executed at boot time. # . /etc/init.d/rc.functions
But dont work, the file test.txt was found and work, but transmission dont start, if I copy and paste "transmission-daemon -p 9091 -a * -t -u hello -v hello -w /media/hdd01" into a console it work for me.
Ok, I guess you need to start it as a proper daemon then. It's a little tricky to configure, but bare with me.
First go to terminal and su to root then then type leafpad /etc/daemons.conf Then create these lines at the bottom of that file and save: # Transmission daemon options: TRANSMISSION_OPTIONS="-p 9091 -a * -t -u hello -v hello -w /media/hdd01"
Ok, now create a file called transmission-daemon and add this into it: #!/bin/sh # /etc/init.d/transmission-daemon : Start, stop and restart the tranmission # daemon on at boot time or with the command line. # # To start the tranmission daemon at boot time, just put transmission-daemon # in the $RUN_DAEMONS variable of /etc/rcS.conf and configure options with # /etc/daemons.conf # . /etc/init.d/rc.functions . /etc/daemons.conf
NAME=transmission-daemon DESC="File Sharing Daemon" # I'm assuming it's here, it might be at /usr/bin/transmission-daemon DAEMON=/usr/sbin/transmission-daemon OPTIONS=$TRANSMISSION_OPTIONS PIDFILE=/var/run/transmission-daemon.pid
case "$1" in start) if active_pidfile $PIDFILE transmission-daemon ; then echo "$NAME already running." exit 1 fi echo -n "Starting $DESC: $NAME... " $DAEMON $OPTIONS status ;; stop) if ! active_pidfile $PIDFILE transmission-daemon ; then echo "$NAME is not running." exit 1 fi echo -n "Stopping $DESC: $NAME... " kill `cat $PIDFILE` status ;; restart) if ! active_pidfile $PIDFILE transmission-daemon ; then echo "$NAME is not running." exit 1 fi echo -n "Restarting $DESC: $NAME... " kill `cat $PIDFILE` sleep 2 $DAEMON $OPTIONS status ;; *) echo "" echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" echo "" exit 1 ;; esac
exit 0
Now do chmod 777 transmission-daemon and chmod +x transmission-daemon (Just make it runable and that all users can use it)
Now in terminal, su to root again and type mv transmission-daemon /etc/init.d/
Now go to Menu--->System Tools--->Control Box--->Initialization and add transmission-daemon just before slim in the Run daemons box so it looks like this: dbus hald firewall transmission-daemon slim
Now again from terminal test if it's working by typing /etc/init.d/transmission-daemon start
If all goes well, this should work and allow the daemon to start when you boot your PC. I haven't tested this, so it's mostly guess work, but I hope it helps.