New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Startup script?

Got problems with Bubba? Then this forum is for you.
Locked
JohanJ
Posts: 32
Joined: 21 Sep 2007, 09:15

Startup script?

Post 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
JohanJ
Posts: 32
Joined: 21 Sep 2007, 09:15

Re: Startup script?

Post 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?
6feet5
Posts: 269
Joined: 13 Apr 2007, 17:32
Location: Gnesta, Sweden
Contact:

Post 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
JohanJ
Posts: 32
Joined: 21 Sep 2007, 09:15

Post 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 ?
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Post 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
Eek
Posts: 372
Joined: 23 Dec 2007, 03:03
Location: the Netherlands

Post by Eek »

You can also try sysvconfig.

Code: Select all

apt-get install sysvconfig
Locked