LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 04-13-2005, 06:37 PM   #1
kurrupt
Member
 
Registered: Jul 2004
Distribution: Debian, Ubuntu, FreeBSD, RHEL
Posts: 202

Rep: Reputation: 31
bash scripting..


hey guys.. iam a newbie when its coming to bash scripting.. and stuff. i just started to learn it recently and i love it..

but this is my question.. i have made up my scripts.. but i want them to be executed upon bootup... now which startup file is good to edit so i can put my script ( i wont be putting the actual code in.. i will just be simply adding this line "./myscript" )
 
Old 04-13-2005, 06:46 PM   #2
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 51
The last one run for the system is /etc/rc.d/rc.local for many distributions, but not for debian.
If you want them run for a specific user at login, put them in .bashrc or similar in the user's home dir. If you want them run for all users at login then /etc/profile or similar.
 
Old 04-13-2005, 06:49 PM   #3
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 56
On my FC3 box, I put a line in /etc/rc.d/rc.local

/path/to/myscript
 
Old 09-21-2005, 12:07 AM   #4
bhar0761
Member
 
Registered: Jul 2005
Location: San Francisco
Distribution: Fedora Core 6
Posts: 64

Rep: Reputation: 15
just
/etc/rc.local
since it is a sym link to /etc/rc.d/rc.local
you can even have it run the script as another which is best practices
entry

su username -c /path/to/script
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash scripting pete1234 Programming 1 09-27-2005 01:48 AM
BASH If-then-else Scripting Help xianzai Programming 4 10-29-2004 04:09 AM
Bash scripting Gunslinger_ROL Programming 5 09-28-2004 11:37 AM
Bash scripting JonCooperUK Programming 3 03-04-2004 08:55 PM
Bash scripting kbeaver Programming 5 07-18-2003 08:35 PM


All times are GMT -5. The time now is 03:15 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration