Re: On-Boot Scripts

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



On Fri, Nov 13, 2009 at 4:40 PM, Robert Heller <heller@xxxxxxxxxxxx> wrote:
At Fri, 13 Nov 2009 15:15:16 -0500 CentOS mailing list <centos@xxxxxxxxxx> wrote:

>
>
>
> On Fri, Nov 13, 2009 at 2:47 PM, <m.roth@xxxxxxxxx> wrote:
>
> > > On 11/13/2009 07:21 PM, Larry Brigman wrote:
> > >> either write an init script to be added to /etc/rc.d/init.d or
> > >> add it to the end of /etc/rc.d/rc.local
> > >
> > > It looks, to me, that Victor is at a stage where he does not know what
> > > he is doing with the basic stuff - pointing him at good docs might be
> > > worth more than spoon-feeding.
> >
>
> I'm a bit rusty. It's been a couple of years since I've run my own server,
> and I don't know this OS. And as we all know, each OS is different. I'm
> trying to install scripts I wrote years ago to do my MySQL backups.

You probably don't want to do your MySQL backups only at boot time.  I
think what you really need is to look at crontab's documentation.
Unless your MySQL backup scripts themselves behave like deamons and do
their own cron-like behaviour.

There are really only two main flavors of UNIX/Linux boot
methods/schools.  The BSD school and the SYS V school.  *Most* Linux
distros (including RedHat's) favor the SYS V school: little scripts in
/etc/init.d (or /etc/rc.d/init.d, depending on the vintage), with
symlinks in /etc/rcN.d/.  The BSD school has a set of scripts for each
run level.  I *think* Slackware uses this method (just because Slackware
likes to be different).

>
> As for pointing me to the docs, I looked through them but couldn't make
> heads or tails of them. Yes, I need to study them, but right now I just need
> to get some basic things working so that I can make a little money and put
> food on the table :)
>
> I've loaded my scripts to /etc/rc.d/init.d Now how do I schedule my cron
> jobs?

Cron job scripts don't go in /etc/rc.d/init.d!.  You can (should!) put
them someplace else.  It does not really matter where (but should be
someplace sensable).  You schedule them using crontab -- there are TWO
manpages you should read: man 1 crontab (using the command to list or
edit a crontab file) AND man 5 crontab (format of the entries in the
file).  Read *both* pages carefully.

Thank you.
V
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux