LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-20-2004, 12:11 PM   #1
fanda
LQ Newbie
 
Registered: Nov 2004
Posts: 11

Rep: Reputation: 0
Startup scripts on Debian


I have Debian and want to run some scripts on startup, how should I do it please /

thx ^^
 
Old 11-20-2004, 01:44 PM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 51
the basic setup is scripts go in
/etc/init.d
chmod 755 new ones to make them runable
then for the various runlevels links to the scripts go in /etc/rc#.d where # is a run level number
(read /etc/inittab for a description of various run levels and to see what is your default)
start links begin with S
kill links begin with K
after S or K is a number
scripts links are processed in numerical order using that number -- if two tie then alphabetical decides the winner
 
Old 11-21-2004, 03:55 AM   #3
fanda
LQ Newbie
 
Registered: Nov 2004
Posts: 11

Original Poster
Rep: Reputation: 0
Huuuh, OK, so I put my scripts in /etc/init.d and set them on 755, that part I understood.

Then I understood I have to do something with the /etc/rc#.d but I don't understand quite what.

My scripts are for my internet connection sharing (the IPTABLES rules that are flushed every startup), so could you please give me an example ?
 
Old 11-21-2004, 06:01 AM   #4
Draygo
Member
 
Registered: May 2004
Location: Frisco, TX
Distribution: Debian Unstable
Posts: 73

Rep: Reputation: 15
since you are running debian read up on update-rc.d. The man pages will show you how to make that file /etc/init.d start up and be killed at certain runlevels.
 
  


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
VPN: Debian Scripts -> Mandriva 2006 Scripts Undefined Mandriva 0 11-30-2005 12:10 PM
startup scripts iomari Suse/Novell 2 10-19-2005 01:38 AM
Startup Scripts?? jimbo-62 Debian 5 07-10-2005 10:23 AM
startup scripts doralsoral Linux - Software 6 01-12-2004 03:46 PM
startup scripts amphion Linux - Newbie 8 03-28-2003 01:39 PM


All times are GMT -5. The time now is 01:16 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