source: general/sysutils/fcron.xml

trunk
Last change on this file was 5d0e7b8, checked in by Douglas R. Reno <renodr@…>, 2 months ago

A bunch of tags

  • Property mode set to 100644
File size: 15.5 KB
RevLine 
[ab4fdfc]1<?xml version="1.0" encoding="UTF-8"?>
[6732c094]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[52d29f7]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
[30edc031]7 <!ENTITY fcron-download-http "http://fcron.free.fr/archives/fcron-&fcron-version;.src.tar.gz">
[c1968e6]8 <!ENTITY fcron-download-ftp " ">
[ac1de6f]9 <!ENTITY fcron-md5sum "bd4996e941a40327d11efc5e3fd1f839">
10 <!ENTITY fcron-size "587 KB">
[65f4210a]11 <!ENTITY fcron-buildsize "5.1 MB">
[354f5e4d]12 <!ENTITY fcron-time "0.1 SBU">
[52d29f7]13]>
14
[5c5cdbc]15<sect1 id="fcron" xreflabel="Fcron-&fcron-version;">
[30edc031]16 <?dbhtml filename="fcron.html"?>
17
18
19 <title>Fcron-&fcron-version;</title>
20
21 <indexterm zone="fcron">
22 <primary sortas="a-Fcron">Fcron</primary>
23 </indexterm>
24
25 <sect2 role="package">
26 <title>Introduction to Fcron</title>
27
[b1532549]28 <para>
29 The <application>Fcron</application> package contains a periodical
30 command scheduler which aims at replacing <application>Vixie
31 Cron</application>.
32 </para>
[30edc031]33
[5d0e7b8]34 &lfs121_checked;
[61a8dd8]35
[30edc031]36 <bridgehead renderas="sect3">Package Information</bridgehead>
37 <itemizedlist spacing="compact">
38 <listitem>
[b1532549]39 <para>
40 Download (HTTP): <ulink url="&fcron-download-http;"/>
41 </para>
[30edc031]42 </listitem>
43 <listitem>
[b1532549]44 <para>
45 Download (FTP): <ulink url="&fcron-download-ftp;"/>
46 </para>
[30edc031]47 </listitem>
48 <listitem>
[b1532549]49 <para>
50 Download MD5 sum: &fcron-md5sum;
51 </para>
[30edc031]52 </listitem>
53 <listitem>
[b1532549]54 <para>
55 Download size: &fcron-size;
56 </para>
[30edc031]57 </listitem>
58 <listitem>
[b1532549]59 <para>
60 Estimated disk space required: &fcron-buildsize;
61 </para>
[30edc031]62 </listitem>
63 <listitem>
[b1532549]64 <para>
65 Estimated build time: &fcron-time;
66 </para>
[30edc031]67 </listitem>
68 </itemizedlist>
[00bf2c9]69<!--
[7ad652c]70 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
71 <itemizedlist spacing="compact">
72 <listitem>
73 <para>
74 Required patch:
75 <ulink url="&patch-root;/fcron-&fcron-version;-sendmail_upstream-1.patch"/>
76 </para>
77 </listitem>
78 </itemizedlist>
[00bf2c9]79-->
[30edc031]80 <bridgehead renderas="sect3">Fcron Dependencies</bridgehead>
[bccbdaea]81
[30edc031]82 <bridgehead renderas="sect4">Optional</bridgehead>
[b1532549]83 <para role="optional">
84 An <xref linkend="server-mail"/>,
85 <ulink url="../postlfs/editors.html">text editor</ulink> (default is
86 <command>vi</command> from the <xref linkend="vim"/> package),
87 <xref linkend="linux-pam"/>, and
88 <xref linkend="docbook-utils"/>
[12b202ed]89 </para>
[30edc031]90
91 </sect2>
92
93 <sect2 role="installation">
94 <title>Installation of Fcron</title>
95
[b1532549]96 <para id="fcron-syslog" revision="sysv">
97 <application>Fcron</application>
98 uses the cron facility of <command>syslog</command> to log all messages.
99 Since LFS does not set up this facility in
100 <filename>/etc/syslog.conf</filename>, it needs to be done prior to
101 installing <application>Fcron</application>. This command will append the
102 necessary line to the current <filename>/etc/syslog.conf</filename>
103 (perform as the <systemitem class='username'>root</systemitem> user):
104 </para>
[96a04dff]105
106 <indexterm zone="fcron fcron-syslog" revision="sysv">
[30edc031]107 <primary sortas="e-etc-syslog.conf">/etc/syslog.conf</primary>
108 </indexterm>
109
[96a04dff]110<screen role="root" revision="sysv"><userinput>cat &gt;&gt; /etc/syslog.conf &lt;&lt; "EOF"
[30edc031]111<literal># Begin fcron addition to /etc/syslog.conf
[1586494]112
[52d29f7]113cron.* -/var/log/cron.log
[1586494]114
[30edc031]115# End fcron addition</literal>
116EOF</userinput></screen>
[1586494]117
[b1532549]118 <para revision="sysv">
119 The configuration file has been modified, so reloading the
120 <command>sysklogd</command> daemon will activate the changes (again as
121 the <systemitem class='username'>root</systemitem> user).
122 </para>
[30edc031]123
[96a04dff]124<screen role="root" revision="sysv"><userinput>/etc/rc.d/init.d/sysklogd reload</userinput></screen>
[30edc031]125
[b1532549]126 <para>
127 For security reasons, an unprivileged user and group for
128 <application>Fcron</application> should be created (perform as the
129 <systemitem class='username'>root</systemitem> user):
130 </para>
[30edc031]131
[b785ab29]132<screen role="root"><userinput>groupadd -g 22 fcron &amp;&amp;
133useradd -d /dev/null -c "Fcron User" -g fcron -s /bin/false -u 22 fcron</userinput></screen>
[30edc031]134
[64755c75]135 <para>
[7a9a7b26]136 Now fix some locations hard coded in the documentation:
[64755c75]137 </para>
138
139<screen><userinput>find doc -type f -exec sed -i 's:/usr/local::g' {} \;</userinput></screen>
[b1532549]140 <para>
141 Install <application>Fcron</application> by running the following
142 commands:
143 </para>
[30edc031]144
[5c9e998]145<screen revision="sysv"><userinput>./configure --prefix=/usr \
[b9edd3d]146 --sysconfdir=/etc \
147 --localstatedir=/var \
148 --without-sendmail \
149 --with-boot-install=no \
150 --with-systemdsystemunitdir=no &amp;&amp;
[30edc031]151make</userinput></screen>
152
[5c9e998]153<screen revision="systemd"><userinput>./configure --prefix=/usr \
154 --sysconfdir=/etc \
155 --localstatedir=/var \
156 --without-sendmail \
[9a4c0d91]157 --with-piddir=/run \
[5c9e998]158 --with-boot-install=no &amp;&amp;
159make</userinput></screen>
160
[b1532549]161 <para>
162 This package does not come with a test suite.
163 </para>
[30edc031]164
[b1532549]165 <para>
166 Now, as the <systemitem class="username">root</systemitem> user:
167 </para>
[30edc031]168
169<screen role="root"><userinput>make install</userinput></screen>
170
[b1532549]171 <para>
172 DESTDIR install must be done as <systemitem
[2f5d812]173 class="username">root</systemitem> user. Furthermore, if PAM
174 configuration files should be installed in <filename class="directory">
175 /etc/pam.d</filename>, you have to create this directory in the
176 DESTDIR before doing the install.
[b1532549]177 </para>
[65f4210a]178
[30edc031]179 </sect2>
180
181 <sect2 role="commands">
182 <title>Command Explanations</title>
[1bbad3f]183<!--
[b1532549]184 <para>
185 <command>autoconf</command>: This command is required to rebuild
186 <filename>configure</filename> using the fixed input file.
187 </para>-->
188
189 <para>
190 <parameter>--without-sendmail</parameter>: By default,
191 <application>Fcron</application> will attempt to use the
192 <command>sendmail</command> command from an <xref linkend="server-mail"/>
193 package to email you the results of the <command>fcron</command> script.
194 This switch is used to disable default email notification. Omit the
195 switch to enable the default. Alternatively, you can use the
196 <option>--with-sendmail=<replaceable>&lt;/path/to/MTA
197 command&gt;</replaceable></option> to use a different mailer command.
198 </para>
[30edc031]199
[b1532549]200 <para>
201 <parameter>--with-boot-install=no</parameter>: This prevents
202 installation of the bootscript included with the package.
203 </para>
[b9edd3d]204
[b1532549]205 <para revision="systemd">
206 <parameter>--with-piddir=/run</parameter>:
207 This fixes the systemd unit to use the proper directory for PID files so
208 that systemctl does not hang and the unit starts correctly.
209 </para>
[9a4c0d91]210
[b1532549]211 <para revision="sysv">
212 <parameter>--with-systemdsystemunitdir=no</parameter>:
213 This prevents building the <application>systemd</application> units,
214 which are not needed for a <application>SYS V</application> system.
215 </para>
[30edc031]216
[b1532549]217 <para>
218 <option>--with-editor=<replaceable>&lt;/path/to/editor&gt;</replaceable></option>:
219 This switch allows you to set the default text editor.
220 </para>
[b9edd3d]221
[b1532549]222 <para>
223 <option>--with-dsssl-dir=<replaceable>&lt;/path/to/dsssl-stylesheets&gt;</replaceable></option>:
224 May be used if you have <xref linkend="docbook-utils"/> installed.
225 Currently, the dsssl stylesheets are located at
226 <filename class="directory">/usr/share/sgml/docbook/dsssl-stylesheets-1.79</filename>.
227 </para>
[7afe2f1f]228
[30edc031]229 </sect2>
230
231 <sect2 role="configuration">
232 <title>Configuring Fcron</title>
233
234 <sect3 id="fcron-config">
235 <title>Config Files</title>
236
[b1532549]237 <para>
238 <filename>/etc/fcron.conf</filename>,
239 <filename>/etc/fcron.allow</filename>, and
240 <filename>/etc/fcron.deny</filename>
241 </para>
[30edc031]242
243 <indexterm zone="fcron fcron-config">
244 <primary sortas="e-etc-fcron.conf">/etc/fcron.conf</primary>
245 </indexterm>
246
247 <indexterm zone="fcron fcron-config">
248 <primary sortas="e-etc-fcron.allow">/etc/fcron.allow</primary>
249 </indexterm>
250
251 <indexterm zone="fcron fcron-config">
252 <primary sortas="e-etc-fcron.deny">/etc/fcron.deny</primary>
253 </indexterm>
254
255 </sect3>
256
[4fda2677]257 <sect3 id="run-parts" xreflabel="Fcron Configuration Information">
[30edc031]258 <title>Configuration Information</title>
259
[b1532549]260 <para>
261 There are no required changes in any of the config files.
262 Configuration information can be found in the man page for
263 <filename>fcron.conf</filename>.
264 </para>
[bccbdaea]265
[b1532549]266 <para>
267 <command>fcron</command> scripts are written using
268 <command>fcrontab</command>. Refer to the <command>fcrontab</command>
269 man page for proper parameters to address your situation.
270 </para>
[30edc031]271
[b1532549]272 <para id="fcron-pam">
273 If <application>Linux-PAM</application> is installed, two PAM
274 configuration files are installed in <filename class='directory'>
275 etc/pam.d</filename>. Alternatively if <filename class='directory'>
276 etc/pam.d</filename> is not used, the installation will append two
277 configuration sections to the existing <filename>/etc/pam.conf
278 </filename> file. You should ensure the files match your preferences.
279 Modify them as required to suit your needs.
280 </para>
[30edc031]281
282 <indexterm zone="fcron fcron-pam">
283 <primary sortas="e-etc-pam.d">/etc/pam.d/*</primary>
284 </indexterm>
285
286 <indexterm zone="fcron fcron-pam">
287 <primary sortas="e-etc-pam.conf">/etc/pam.conf</primary>
288 </indexterm>
289
[601c752]290 <bridgehead renderas="sect4">Periodic Jobs</bridgehead>
291
292 <para>
[b59e5eb3]293 If you would like to set up a periodic hierarchy for the root user,
[601c752]294 first issue the following commands (as the
[25ae8b8]295 <systemitem class="username">root</systemitem> user) to create the
[601c752]296 <filename>/usr/bin/run-parts</filename> script:
297 </para>
298
299<screen role="root"><userinput>cat &gt; /usr/bin/run-parts &lt;&lt; "EOF" &amp;&amp;
[51dfb3e]300<literal>#!/bin/sh
[601c752]301# run-parts: Runs all the scripts found in a directory.
302# from Slackware, by Patrick J. Volkerding with ideas borrowed
303# from the Red Hat and Debian versions of this utility.
304
305# keep going when something fails
306set +e
307
308if [ $# -lt 1 ]; then
309 echo "Usage: run-parts &lt;directory&gt;"
310 exit 1
311fi
312
313if [ ! -d $1 ]; then
314 echo "Not a directory: $1"
315 echo "Usage: run-parts &lt;directory&gt;"
316 exit 1
317fi
318
319# There are several types of files that we would like to
320# ignore automatically, as they are likely to be backups
321# of other scripts:
322IGNORE_SUFFIXES="~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp"
323
324# Main loop:
325for SCRIPT in $1/* ; do
326 # If this is not a regular file, skip it:
327 if [ ! -f $SCRIPT ]; then
328 continue
329 fi
330 # Determine if this file should be skipped by suffix:
331 SKIP=false
332 for SUFFIX in $IGNORE_SUFFIXES ; do
333 if [ ! "$(basename $SCRIPT $SUFFIX)" = "$(basename $SCRIPT)" ]; then
334 SKIP=true
335 break
336 fi
337 done
338 if [ "$SKIP" = "true" ]; then
339 continue
340 fi
341 # If we've made it this far, then run the script if it's executable:
342 if [ -x $SCRIPT ]; then
343 $SCRIPT || echo "$SCRIPT failed."
344 fi
345done
346
[51dfb3e]347exit 0</literal>
[601c752]348EOF
349chmod -v 755 /usr/bin/run-parts</userinput></screen>
350
351 <para>
352 Next, create the directory layout for the periodic jobs (again as the
353 <systemitem class="username">root</systemitem> user):
354 </para>
355
356<screen role="root"><userinput>install -vdm754 /etc/cron.{hourly,daily,weekly,monthly}</userinput></screen>
357
358 <para>
359 Finally, add the <command>run-parts</command> to the system fcrontab
360 (while still the <systemitem class="username">root</systemitem> user):
361 </para>
362
363<screen role="root"><userinput>cat &gt; /var/spool/fcron/systab.orig &lt;&lt; "EOF"
[51dfb3e]364<literal>&amp;bootrun 01 * * * * root run-parts /etc/cron.hourly
[601c752]365&amp;bootrun 02 4 * * * root run-parts /etc/cron.daily
366&amp;bootrun 22 4 * * 0 root run-parts /etc/cron.weekly
[51dfb3e]367&amp;bootrun 42 4 1 * * root run-parts /etc/cron.monthly</literal>
[601c752]368EOF</userinput></screen>
369
[30edc031]370 </sect3>
371
372 <sect3 id="fcron-init">
[96a04dff]373 <title><phrase revision="sysv">Boot Script</phrase>
374 <phrase revision="systemd">Systemd Unit</phrase></title>
[30edc031]375
[b1532549]376 <para revision="sysv">
377 Install the
378 <filename>/etc/rc.d/init.d/fcron</filename> init script from the
379 <xref linkend="bootscripts"/> package.
380 </para>
[96a04dff]381
[b1532549]382 <para revision="systemd">
383 Enable <application>fcron</application> to start
384 at boot using the previously installed systemd unit.
385 </para>
[30edc031]386
387 <indexterm zone="fcron fcron-init">
388 <primary sortas="f-fcron">fcron</primary>
389 </indexterm>
390
[96a04dff]391<screen role="root" revision="sysv"><userinput>make install-fcron</userinput></screen>
392
393<screen role="root" revision="systemd"><userinput>systemctl enable fcron</userinput></screen>
[30edc031]394
[b1532549]395 <para>
396 Finally, again as the <systemitem class="username">root</systemitem>
397 user, start fcron and generate the
398 <filename>/var/spool/fcron/systab</filename> file:
399 </para>
[601c752]400
[ecd1111]401<screen role="root" revision="sysv"><userinput>/etc/rc.d/init.d/fcron start &amp;&amp;
[601c752]402fcrontab -z -u systab</userinput></screen>
403
[ecd1111]404<screen role="root" revision="systemd"><userinput>systemctl start fcron &amp;&amp;
405fcrontab -z -u systab</userinput></screen>
[30edc031]406 </sect3>
407
408 </sect2>
409
410 <sect2 role="content">
411 <title>Contents</title>
412
413 <segmentedlist>
414 <segtitle>Installed Programs</segtitle>
415 <segtitle>Installed Libraries</segtitle>
416 <segtitle>Installed Directories</segtitle>
417
418 <seglistitem>
419 <seg>fcron, fcrondyn, fcronsighup, and fcrontab</seg>
420 <seg>None</seg>
421 <seg>/usr/share/doc/fcron-&fcron-version; and /var/spool/fcron</seg>
422 </seglistitem>
423 </segmentedlist>
424
425 <variablelist>
426 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
427 <?dbfo list-presentation="list"?>
428 <?dbhtml list-presentation="table"?>
429
430 <varlistentry id="fcron-prog">
431 <term><command>fcron</command></term>
432 <listitem>
[b1532549]433 <para>
[4c24eb0a]434 is the scheduling daemon
[b1532549]435 </para>
[30edc031]436 <indexterm zone="fcron fcron-prog">
437 <primary sortas="b-fcron">fcron</primary>
438 </indexterm>
439 </listitem>
440 </varlistentry>
441
442 <varlistentry id="fcrondyn">
443 <term><command>fcrondyn</command></term>
444 <listitem>
[b1532549]445 <para>
446 is a user tool intended to interact with a running
[4c24eb0a]447 <command>fcron</command> daemon
[b1532549]448 </para>
[30edc031]449 <indexterm zone="fcron fcrondyn">
450 <primary sortas="b-fcrondyn">fcrondyn</primary>
451 </indexterm>
452 </listitem>
453 </varlistentry>
454
455 <varlistentry id="fcronsighup">
456 <term><command>fcronsighup</command></term>
457 <listitem>
[b1532549]458 <para>
459 instructs <command>fcron</command> to reread the
[4c24eb0a]460 <application>Fcron</application> tables
[b1532549]461 </para>
[30edc031]462 <indexterm zone="fcron fcronsighup">
463 <primary sortas="b-fcronsighup">fcronsighup</primary>
464 </indexterm>
465 </listitem>
466 </varlistentry>
467
468 <varlistentry id="fcrontab">
469 <term><command>fcrontab</command></term>
470 <listitem>
[b1532549]471 <para>
472 is a program used to install, edit, list and remove the
[4c24eb0a]473 tables used by <command>fcron</command>
[b1532549]474 </para>
[30edc031]475 <indexterm zone="fcron fcrontab">
476 <primary sortas="b-fcrontab">fcrontab</primary>
477 </indexterm>
478 </listitem>
479 </varlistentry>
480
481 </variablelist>
482
483 </sect2>
[f45b1953]484
485</sect1>
Note: See TracBrowser for help on using the repository browser.