source: general/sysutils/fcron.xml@ 65caf34

12.1 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18
Last change on this file since 65caf34 was c8b719a, checked in by Douglas R. Reno <renodr@…>, 10 months ago

Tags

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