Page 1 of 1

Startup script?

Posted: 15 Dec 2007, 10:55
by JohanJ
Hi is there anyone who got a startscript that starts ,screen, rtorrent ,dims the led and so on when the bubba reboots ?

/Johan

Re: Startup script?

Posted: 31 Dec 2007, 03:43
by JohanJ
JohanJ wrote:Hi is there anyone who got a startscript that starts ,screen, rtorrent ,dims the led and so on when the bubba reboots ?

/Johan
anyone?

Posted: 31 Dec 2007, 07:58
by 6feet5
Hi,

Maybe it's me, but I don't understand what it is you want. Could you be a bit more specific on what it is you're looking for.

Are we talking about one script doing all this?
What do you mean with "screen", and perhaps more importantly, what does "and so on" include; do your laundry, walk the dog or what ;-)

Dimming the LED is easy. If you always want the led to be dimmed, edit the file /etc/init.d/led_on to something like:

Code: Select all

#! /bin/sh

/usr/sbin/gpioapp blink 5 100
Now the led will blink but with such high speed that it'll look like it is on, but with less intense light. Change the numbers until you get the intensity you want. First number is on-time, second number is off-time. You want to keep them low, or you'll notice the blinking.

/Johan

Posted: 31 Dec 2007, 09:57
by JohanJ
ok
What i meant was that every time i reboot my bubba i must login with telnet to start screen and rtorrent ,led (solved)
is the any type of start "script" that can do that for me ?

Posted: 01 Jan 2008, 13:09
by Ubi
Sure.

First create a script like /etc/init.d/customcommands
then edit this file, using some text editor:

Code: Select all

nano /etc/init.d/customcommands
in this file put the commands you like such as:

Code: Select all

#! /bin/sh 

/usr/sbin/gpioapp blink 5 100
/usr/local/somesoftware/start.sh
Be sure to make this script self-running. You won;t be able to interact with it and funny things happens if it hangs on a user input.

Anyway, now make a startup link in /etc/rc3.d, which is the runlevel you use

Code: Select all

ln -s /etc/init.d/customcommands /etc/rc3.d/S99customcommands
more info:
http://en.wikipedia.org/wiki/Runlevel
http://www.netbsd.org/docs/guide/en/chap-rc.html
http://www.atnf.csiro.au/people/rgooch/ ... t-scripts/

hope this helps
Ubi

Posted: 02 Jan 2008, 03:06
by Eek
You can also try sysvconfig.

Code: Select all

apt-get install sysvconfig