source: general/sysutils/fcron.xml@ eb9d3f2

elogind
Last change on this file since eb9d3f2 was eb9d3f2, checked in by Pierre Labastie <pieere@…>, 5 years ago

Add a few missing <literal>

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/BOOK-elogind@21724 af4574ff-66df-0310-9fd7-8a98e5e911e0

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