source: general/sysutils/fcron.xml@ c8293ea

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 c8293ea was 88fdf09, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Tags

  • Property mode set to 100644
File size: 15.6 KB
RevLine 
[52d29f7]1<?xml version="1.0" encoding="ISO-8859-1"?>
[6732c094]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[52d29f7]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
[30edc031]7 <!ENTITY fcron-download-http "http://fcron.free.fr/archives/fcron-&fcron-version;.src.tar.gz">
[c1968e6]8 <!ENTITY fcron-download-ftp " ">
9<!-- <!ENTITY fcron-download-ftp "ftp://ftp.seul.org/pub/fcron/fcron-&fcron-version;.src.tar.gz">-->
[ac1de6f]10 <!ENTITY fcron-md5sum "bd4996e941a40327d11efc5e3fd1f839">
11 <!ENTITY fcron-size "587 KB">
[65f4210a]12 <!ENTITY fcron-buildsize "5.1 MB">
[354f5e4d]13 <!ENTITY fcron-time "0.1 SBU">
[52d29f7]14]>
15
[5c5cdbc]16<sect1 id="fcron" xreflabel="Fcron-&fcron-version;">
[30edc031]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
[b1532549]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>
[30edc031]37
[88fdf09]38 &lfs110a_checked;
[61a8dd8]39
[30edc031]40 <bridgehead renderas="sect3">Package Information</bridgehead>
41 <itemizedlist spacing="compact">
42 <listitem>
[b1532549]43 <para>
44 Download (HTTP): <ulink url="&fcron-download-http;"/>
45 </para>
[30edc031]46 </listitem>
47 <listitem>
[b1532549]48 <para>
49 Download (FTP): <ulink url="&fcron-download-ftp;"/>
50 </para>
[30edc031]51 </listitem>
52 <listitem>
[b1532549]53 <para>
54 Download MD5 sum: &fcron-md5sum;
55 </para>
[30edc031]56 </listitem>
57 <listitem>
[b1532549]58 <para>
59 Download size: &fcron-size;
60 </para>
[30edc031]61 </listitem>
62 <listitem>
[b1532549]63 <para>
64 Estimated disk space required: &fcron-buildsize;
65 </para>
[30edc031]66 </listitem>
67 <listitem>
[b1532549]68 <para>
69 Estimated build time: &fcron-time;
70 </para>
[30edc031]71 </listitem>
72 </itemizedlist>
[00bf2c9]73<!--
[7ad652c]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>
[00bf2c9]83-->
[30edc031]84 <bridgehead renderas="sect3">Fcron Dependencies</bridgehead>
[bccbdaea]85
[30edc031]86 <bridgehead renderas="sect4">Optional</bridgehead>
[b1532549]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"/>
[12b202ed]93 </para>
[30edc031]94
[1039de3]95 <para condition="html" role="usernotes">User Notes:
96 <ulink url="&blfs-wiki;/fcron"/></para>
97
[30edc031]98 </sect2>
99
100 <sect2 role="installation">
101 <title>Installation of Fcron</title>
102
[b1532549]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>
[96a04dff]112
113 <indexterm zone="fcron fcron-syslog" revision="sysv">
[30edc031]114 <primary sortas="e-etc-syslog.conf">/etc/syslog.conf</primary>
115 </indexterm>
116
[96a04dff]117<screen role="root" revision="sysv"><userinput>cat &gt;&gt; /etc/syslog.conf &lt;&lt; "EOF"
[30edc031]118<literal># Begin fcron addition to /etc/syslog.conf
[1586494]119
[52d29f7]120cron.* -/var/log/cron.log
[1586494]121
[30edc031]122# End fcron addition</literal>
123EOF</userinput></screen>
[1586494]124
[b1532549]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>
[30edc031]130
[96a04dff]131<screen role="root" revision="sysv"><userinput>/etc/rc.d/init.d/sysklogd reload</userinput></screen>
[30edc031]132
[b1532549]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>
[30edc031]138
[b785ab29]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>
[30edc031]141
[b1532549]142 <para>
143 Install <application>Fcron</application> by running the following
144 commands:
145 </para>
[30edc031]146
[5c9e998]147<screen revision="sysv"><userinput>./configure --prefix=/usr \
[b9edd3d5]148 --sysconfdir=/etc \
149 --localstatedir=/var \
150 --without-sendmail \
151 --with-boot-install=no \
152 --with-systemdsystemunitdir=no &amp;&amp;
[30edc031]153make</userinput></screen>
154
[5c9e998]155<screen revision="systemd"><userinput>./configure --prefix=/usr \
156 --sysconfdir=/etc \
157 --localstatedir=/var \
158 --without-sendmail \
[9a4c0d91]159 --with-piddir=/run \
[5c9e998]160 --with-boot-install=no &amp;&amp;
161make</userinput></screen>
162
[b1532549]163 <para>
164 This package does not come with a test suite.
165 </para>
[30edc031]166
[b1532549]167 <para>
168 Now, as the <systemitem class="username">root</systemitem> user:
169 </para>
[30edc031]170
171<screen role="root"><userinput>make install</userinput></screen>
172
[b1532549]173 <para>
174 DESTDIR install must be done as <systemitem
[2f5d812]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.
[b1532549]179 </para>
[65f4210a]180
[30edc031]181 </sect2>
182
183 <sect2 role="commands">
184 <title>Command Explanations</title>
[1bbad3f]185<!--
[b1532549]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>
[30edc031]201
[b1532549]202 <para>
203 <parameter>--with-boot-install=no</parameter>: This prevents
204 installation of the bootscript included with the package.
205 </para>
[b9edd3d5]206
[b1532549]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>
[9a4c0d91]212
[b1532549]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>
[30edc031]218
[b1532549]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>
[b9edd3d5]223
[b1532549]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>
[7afe2f1f]230
[30edc031]231 </sect2>
232
233 <sect2 role="configuration">
234 <title>Configuring Fcron</title>
235
236 <sect3 id="fcron-config">
237 <title>Config Files</title>
238
[b1532549]239 <para>
240 <filename>/etc/fcron.conf</filename>,
241 <filename>/etc/fcron.allow</filename>, and
242 <filename>/etc/fcron.deny</filename>
243 </para>
[30edc031]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
[4fda2677]259 <sect3 id="run-parts" xreflabel="Fcron Configuration Information">
[30edc031]260 <title>Configuration Information</title>
261
[b1532549]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>
[bccbdaea]267
[b1532549]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>
[30edc031]273
[b1532549]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>
[30edc031]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
[601c752]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;
[51dfb3e]302<literal>#!/bin/sh
[601c752]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
[51dfb3e]349exit 0</literal>
[601c752]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"
[51dfb3e]366<literal>&amp;bootrun 01 * * * * root run-parts /etc/cron.hourly
[601c752]367&amp;bootrun 02 4 * * * root run-parts /etc/cron.daily
368&amp;bootrun 22 4 * * 0 root run-parts /etc/cron.weekly
[51dfb3e]369&amp;bootrun 42 4 1 * * root run-parts /etc/cron.monthly</literal>
[601c752]370EOF</userinput></screen>
371
[30edc031]372 </sect3>
373
374 <sect3 id="fcron-init">
[96a04dff]375 <title><phrase revision="sysv">Boot Script</phrase>
376 <phrase revision="systemd">Systemd Unit</phrase></title>
[30edc031]377
[b1532549]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>
[96a04dff]383
[b1532549]384 <para revision="systemd">
385 Enable <application>fcron</application> to start
386 at boot using the previously installed systemd unit.
387 </para>
[30edc031]388
389 <indexterm zone="fcron fcron-init">
390 <primary sortas="f-fcron">fcron</primary>
391 </indexterm>
392
[96a04dff]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>
[30edc031]396
[b1532549]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>
[601c752]402
[ecd1111]403<screen role="root" revision="sysv"><userinput>/etc/rc.d/init.d/fcron start &amp;&amp;
[601c752]404fcrontab -z -u systab</userinput></screen>
405
[ecd1111]406<screen role="root" revision="systemd"><userinput>systemctl start fcron &amp;&amp;
407fcrontab -z -u systab</userinput></screen>
[30edc031]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>
[b1532549]435 <para>
[4c24eb0a]436 is the scheduling daemon
[b1532549]437 </para>
[30edc031]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>
[b1532549]447 <para>
448 is a user tool intended to interact with a running
[4c24eb0a]449 <command>fcron</command> daemon
[b1532549]450 </para>
[30edc031]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>
[b1532549]460 <para>
461 instructs <command>fcron</command> to reread the
[4c24eb0a]462 <application>Fcron</application> tables
[b1532549]463 </para>
[30edc031]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>
[b1532549]473 <para>
474 is a program used to install, edit, list and remove the
[4c24eb0a]475 tables used by <command>fcron</command>
[b1532549]476 </para>
[30edc031]477 <indexterm zone="fcron fcrontab">
478 <primary sortas="b-fcrontab">fcrontab</primary>
479 </indexterm>
480 </listitem>
481 </varlistentry>
482
483 </variablelist>
484
485 </sect2>
[f45b1953]486
487</sect1>
Note: See TracBrowser for help on using the repository browser.