Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: Auto run at boot time



Darren Cook wrote:

> I've been reading how-to's and man pages, but I can't seem to find a simple
> explanation of the following. I want to know where I put commands to run at
> boot time. Here are the three types:
>
> 1.A command to run once at boot-time, eg. to make a backup of all the files
> in a directory.

You're on the right way! Just edit what you want on rc.local.

>
>
> 2.Run apache (or some similar server) so it will be listening even if I
> don't log in. I found the init.d directory, but I couldn't find where I
> specify which daemons I want to be started. [*]

You may ask the daemon to run adding it to SysRun (level 3, I guess):
    on rc3.d add a link (using ln -s <where the daemon is - init.d>  S<the
pid>httpd); it will look like: /etc/rc.d/rc3.d/S85httpd -> ../init.d/httpd*


>
>
> 3.A command to run when I log-in as a "darren" but not any other user. Is
> it possible to differentiate between the first time I log-in (maybe to
> backup some files) and each time after that (I don't want it running a
> backup if I'm just opening another virtual console to run man or ls).
>

Just look for you shell rc file (~HOME/.bashrc, for bash for example) and edit
to run your command, it will run only when you log in.

[]'s
    Rafael

-------------------------------------------------------------------
Next Technical Meeting: February 13 (Sat), 12:30 place: Temple Univ.
** presentation: XEmacs, by Steven Baur and Martin Buchholz
Next Nomikai: March 19 (Fri), 19:30   Tengu TokyoEkiMae 03-3275-3691
-------------------------------------------------------------------
more info: http://tlug.linux.or.jp                     Sponsor: PHT


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links