source: general/sysutils/fcron.xml@ 9de2208

11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 9de2208 was b59e5eb3, checked in by David Bryant <davidbryant@…>, 18 months ago

Fixed a common misspelling. "setup" is a noun. When "set up" is a
phrasal verb, it is spelled as two words. This commit fixes most of
the misspelled "set up" instances in the BLFS book.

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