source: general/sysutils/fcron.xml@ 179d426d

11.0 11.1 11.2 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 upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 179d426d was 179d426d, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Tags and a glibc-2.24 update for postfix

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