LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Auto starting an application (https://www.linuxquestions.org/questions/linux-newbie-8/auto-starting-an-application-36105/)

bbereg 11-21-2002 03:17 PM

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

trickykid 11-21-2002 04:06 PM

Look in your startup scripts usually found /etc/rc.d or similiar location and place in the appropiate runlevel you boot your system into.

acid_kewpie 11-21-2002 04:07 PM

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.

Nothsa 11-21-2002 04:12 PM

heh... just answered it here

:)

Thymox 11-21-2002 04:13 PM

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.

bbereg 11-21-2002 04:20 PM

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

Thymox 11-21-2002 04:25 PM

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. :D
</edit>

Nothsa 11-21-2002 04:40 PM

bbreg... like I said, I just answered this here


All times are GMT -5. The time now is 04:19 PM.