Reply
Thread Tools
JadeH's Avatar
Posts: 162 | Thanked: 64 times | Joined on Mar 2011
#1
Hey, I wrote a simple (bash) script to do some stuff on my N900 that would need to ideally be started at boot, the script takes care of the rest (sleeping for a while, looping, etc), so it would only needed to be started whenever the N900 boots.. but how? I tried to search a bit on the forums but didn't really find anything.

Thanks!
 
Banned | Posts: 358 | Thanked: 160 times | Joined on Dec 2010
#2
Originally Posted by JadeH View Post
Hey, I wrote a simple (bash) script to do some stuff on my N900 that would need to ideally be started at boot, the script takes care of the rest (sleeping for a while, looping, etc), so it would only needed to be started whenever the N900 boots.. but how? I tried to search a bit on the forums but didn't really find anything.

Thanks!
Take a look in /etc/event.d there are many startup scripts. You want to use this template

PHP Code:
start on started rcS-late
script
foobar
more foobar
end script 
But there is no way to debug ( if you don't use the sdk ) so be sure you want it!

Last edited by epitaph; 2011-03-23 at 23:24.
 
JadeH's Avatar
Posts: 162 | Thanked: 64 times | Joined on Mar 2011
#3
Thanks, I'll try that out!
 
JonWW's Avatar
Posts: 623 | Thanked: 289 times | Joined on Jan 2010 @ UK
#4
If you just have to run stuff once each startup then place your script in /etc/event.d
If your script stays in ram monitoring things then, write a startup script in /etc/event.d but put the main script in /etc/init.d
As epitaph says there are lots of examples in both directories for you to learn from.
 

The Following User Says Thank You to JonWW For This Useful Post:
Banned | Posts: 358 | Thanked: 160 times | Joined on Dec 2010
#5
Originally Posted by JonWW View Post
If you just have to run stuff once each startup then place your script in /etc/event.d
If your script stays in ram monitoring things then, write a startup script in /etc/event.d but put the main script in /etc/init.d
As epitaph says there are lots of examples in both directories for you to learn from.
Why not put the main script in /opt inside an application folder? It doesn't take that much diskspace from rootfs.
 
JadeH's Avatar
Posts: 162 | Thanked: 64 times | Joined on Mar 2011
#6
I managed to get it working by using that template epitaph wrote and putting it in event.d, it's a really simple script, 5 lines long, so it doesn't really use much space
 
Reply


 
Forum Jump


All times are GMT. The time now is 11:56.