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-21-2002, 04:17 PM   #1
bbereg
LQ Newbie
 
Registered: Nov 2002
Location: MN
Distribution: Mandrake
Posts: 2

Rep: Reputation: 0
Auto starting an application


I would like to get my SAMBA server running automatically at
system startup. I know how to do it manually.


Is there a script or some command I can place somewhere ( sort of like the old Autoexec.bat in DOS) which would contain the commands for the startup of the program?


Thanks
Bart

Last edited by bbereg; 11-21-2002 at 04:19 PM.
 
Old 11-21-2002, 05:06 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Look in your startup scripts usually found /etc/rc.d or similiar location and place in the appropiate runlevel you boot your system into.
 
Old 11-21-2002, 05:07 PM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
you should already have the smb daemon script on your system.. /etc/init.d/smb typically, you should be able to make it start automatically either with some silly kde control centre gubbins, or "chkconfig --level 35 smb on" much easier.
 
Old 11-21-2002, 05:12 PM   #4
Nothsa
LQ Newbie
 
Registered: Nov 2002
Posts: 22

Rep: Reputation: 15
heh... just answered it here

 
Old 11-21-2002, 05:13 PM   #5
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Debian + Ubuntu
Posts: 4,358

Rep: Reputation: 57
For GUIs, if you're using a relatively recent (8.0+) version of Mandrake then you can do it from the 'Mandrake Control Center'. Go to the 'system' section, then go to 'services'. Take a look down the list and see if samba is there (it'll be called smb). If you're running something a little older, then you can use a slightly more cumbersome (although I reckon a much better, as far as GUIs go) tksysv.
 
Old 11-21-2002, 05:20 PM   #6
bbereg
LQ Newbie
 
Registered: Nov 2002
Location: MN
Distribution: Mandrake
Posts: 2

Original Poster
Rep: Reputation: 0
TO start SAMBA manually I type

/etc/rc.d/init.d/smb start

I just cannot figure out what I have to do to make it start automatically when the system starts up

(in DOS I would put the command into autoexec.bat)

I am trying to find out what command or commands or script and where to put it in linux
 
Old 11-21-2002, 05:25 PM   #7
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Debian + Ubuntu
Posts: 4,358

Rep: Reputation: 57
In the directory /etc/rc.d there are subdirs called rc?.d ranging from 1 through to 6. In these are symlinks to other files in /etc/rc.d/init.d. The links begin either with an S to start a service or a K to kill it. The number represents at what stage (I believe) the service is to be started, so if it depends on something else, it can be started later. Put it simply, since samba doesn't depend on anything else, in /etc/rc.d/rc3.d you'd make a symlink to /etc/rc.d/init.d/smb and then when you boot (or change to runlevel 3) the samba service will start. This does not mean that it will mount any remote shares at bootup, that's something different. And all of this can be found if you search.

HTH

<edit>
Most of us will already know how to do stuff in DOS, thankyou.
</edit>
 
Old 11-21-2002, 05:40 PM   #8
Nothsa
LQ Newbie
 
Registered: Nov 2002
Posts: 22

Rep: Reputation: 15
bbreg... like I said, I just answered this here
 
  


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
auto starting when cd is inserted oingram Linux - Software 1 11-05-2005 08:12 AM
Auto starting and/or scripting Infernal211283 Linux - Newbie 1 03-22-2005 01:41 PM
auto start application acrors Fedora 10 10-11-2004 12:22 PM
Adding an application to auto-start on boot-time dushkinup Linux - Newbie 4 03-07-2004 08:55 PM
auto application(timed by day) running krome Mandriva 1 01-31-2004 05:21 PM


All times are GMT -5. The time now is 06:33 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration