new sys-cron-config stuff
Will Partain <[email protected]>
| Newsgroups | gmane.comp.sysutils.ark.devel |
|---|---|
| Message-ID | <[email protected]> |
Matt/self have added a new little thing that I think is
Quite Cool, and which I reckon will become a common ARK
idiom...
The sites we manage (including 'glasli1', which we
distribute) have a 'sys-cron-config' package. This
specifies the {at,cron}.{allow,deny} settings for (all hosts
at) a site, then also sets up root's crontab, again for
every host.
It's easy enough to get the standard-to-a-host crontab entry
into root's crontab (e.g.
# standard on Solaris
1 2 * * * [[ -x /usr/sbin/rtc ]] && /usr/sbin/rtc -c > /dev/null 2>&1
) but what about bits of cron stuff that are associated with
misc packages? Well, here's all we had to specify for
package 'amanda-server-config' (i.e. config for our backups
server):
<root-crontab-fragment><string><![CDATA[
30 14 * * 1-5 /usr/local/bin/sudo -u sysbkups /usr/local/sbin/amcheck -m backupSetA
10 5 * * 2-6 /usr/local/bin/sudo -u sysbkups /usr/local/sbin/amdump backupSetA && /bin/mt rewoffl
]]></string></root-crontab-fragment>
Do you see? You specify the cron stuff *with the package it
applies to*. Should that package fall off the face of the
earth (be removed, etc.), crontabs will automagically
adjust...
inetd.conf fragments, log-rotating scripts, init.d boot
scripts, ... -- I hope all of these sorts of things will
fall into the same pattern.
Will