source: general/sysutils/fcron.xml@ 0fa6d836

12.1 ken/TL2024 lazarus trunk xry111/llvm18
Last change on this file since 0fa6d836 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
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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-md5sum "bd4996e941a40327d11efc5e3fd1f839">
10 <!ENTITY fcron-size "587 KB">
11 <!ENTITY fcron-buildsize "5.1 MB">
12 <!ENTITY fcron-time "0.1 SBU">
13]>
14
15<sect1 id="fcron" xreflabel="Fcron-&fcron-version;">
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
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>
33
34 &lfs121_checked;
35
36 <bridgehead renderas="sect3">Package Information</bridgehead>
37 <itemizedlist spacing="compact">
38 <listitem>
39 <para>
40 Download (HTTP): <ulink url="&fcron-download-http;"/>
41 </para>
42 </listitem>
43 <listitem>
44 <para>
45 Download (FTP): <ulink url="&fcron-download-ftp;"/>
46 </para>
47 </listitem>
48 <listitem>
49 <para>
50 Download MD5 sum: &fcron-md5sum;
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download size: &fcron-size;
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Estimated disk space required: &fcron-buildsize;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Estimated build time: &fcron-time;
66 </para>
67 </listitem>
68 </itemizedlist>
69<!--
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>
79-->
80 <bridgehead renderas="sect3">Fcron Dependencies</bridgehead>
81
82 <bridgehead renderas="sect4">Optional</bridgehead>
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"/>
89 </para>
90
91 </sect2>
92
93 <sect2 role="installation">
94 <title>Installation of Fcron</title>
95
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>
105
106 <indexterm zone="fcron fcron-syslog" revision="sysv">
107 <primary sortas="e-etc-syslog.conf">/etc/syslog.conf</primary>
108 </indexterm>
109
110<screen role="root" revision="sysv"><userinput>cat &gt;&gt; /etc/syslog.conf &lt;&lt; "EOF"
111<literal># Begin fcron addition to /etc/syslog.conf
112
113cron.* -/var/log/cron.log
114
115# End fcron addition</literal>
116EOF</userinput></screen>
117
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>
123
124<screen role="root" revision="sysv"><userinput>/etc/rc.d/init.d/sysklogd reload</userinput></screen>
125
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>
131
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>
134
135 <para>
136 Now fix some locations hard coded in the documentation:
137 </para>
138
139<screen><userinput>find doc -type f -exec sed -i 's:/usr/local::g' {} \;</userinput></screen>
140 <para>
141 Install <application>Fcron</application> by running the following
142 commands:
143 </para>
144
145<screen revision="sysv"><userinput>./configure --prefix=/usr \
146 --sysconfdir=/etc \
147 --localstatedir=/var \
148 --without-sendmail \
149 --with-boot-install=no \
150 --with-systemdsystemunitdir=no &amp;&amp;
151make</userinput></screen>
152
153<screen revision="systemd"><userinput>./configure --prefix=/usr \
154 --sysconfdir=/etc \
155 --localstatedir=/var \
156 --without-sendmail \
157 --with-piddir=/run \
158 --with-boot-install=no &amp;&amp;
159make</userinput></screen>
160
161 <para>
162 This package does not come with a test suite.
163 </para>
164
165 <para>
166 Now, as the <systemitem class="username">root</systemitem> user:
167 </para>
168
169<screen role="root"><userinput>make install</userinput></screen>
170
171 <para>
172 DESTDIR install must be done as <systemitem
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.
177 </para>
178
179 </sect2>
180
181 <sect2 role="commands">
182 <title>Command Explanations</title>
183<!--
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>
199
200 <para>
201 <parameter>--with-boot-install=no</parameter>: This prevents
202 installation of the bootscript included with the package.
203 </para>
204
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>
210
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>
216
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>
221
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>
228
229 </sect2>
230
231 <sect2 role="configuration">
232 <title>Configuring Fcron</title>
233
234 <sect3 id="fcron-config">
235 <title>Config Files</title>
236
237 <para>
238 <filename>/etc/fcron.conf</filename>,
239 <filename>/etc/fcron.allow</filename>, and
240 <filename>/etc/fcron.deny</filename>
241 </para>
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
257 <sect3 id="run-parts" xreflabel="Fcron Configuration Information">
258 <title>Configuration Information</title>
259
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>
265
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>
271
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>
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
290 <bridgehead renderas="sect4">Periodic Jobs</bridgehead>
291
292 <para>
293 If you would like to set up a periodic hierarchy for the root user,
294 first issue the following commands (as the
295 <systemitem class="username">root</systemitem> user) to create the
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;
300<literal>#!/bin/sh
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
347exit 0</literal>
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"
364<literal>&amp;bootrun 01 * * * * root run-parts /etc/cron.hourly
365&amp;bootrun 02 4 * * * root run-parts /etc/cron.daily
366&amp;bootrun 22 4 * * 0 root run-parts /etc/cron.weekly
367&amp;bootrun 42 4 1 * * root run-parts /etc/cron.monthly</literal>
368EOF</userinput></screen>
369
370 </sect3>
371
372 <sect3 id="fcron-init">
373 <title><phrase revision="sysv">Boot Script</phrase>
374 <phrase revision="systemd">Systemd Unit</phrase></title>
375
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>
381
382 <para revision="systemd">
383 Enable <application>fcron</application> to start
384 at boot using the previously installed systemd unit.
385 </para>
386
387 <indexterm zone="fcron fcron-init">
388 <primary sortas="f-fcron">fcron</primary>
389 </indexterm>
390
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>
394
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>
400
401<screen role="root" revision="sysv"><userinput>/etc/rc.d/init.d/fcron start &amp;&amp;
402fcrontab -z -u systab</userinput></screen>
403
404<screen role="root" revision="systemd"><userinput>systemctl start fcron &amp;&amp;
405fcrontab -z -u systab</userinput></screen>
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>
433 <para>
434 is the scheduling daemon
435 </para>
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>
445 <para>
446 is a user tool intended to interact with a running
447 <command>fcron</command> daemon
448 </para>
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>
458 <para>
459 instructs <command>fcron</command> to reread the
460 <application>Fcron</application> tables
461 </para>
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>
471 <para>
472 is a program used to install, edit, list and remove the
473 tables used by <command>fcron</command>
474 </para>
475 <indexterm zone="fcron fcrontab">
476 <primary sortas="b-fcrontab">fcrontab</primary>
477 </indexterm>
478 </listitem>
479 </varlistentry>
480
481 </variablelist>
482
483 </sect2>
484
485</sect1>
Note: See TracBrowser for help on using the repository browser.