<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;

  <!ENTITY fcron-download-http "http://fcron.free.fr/archives/fcron-&fcron-version;.src.tar.gz">
  <!ENTITY fcron-download-ftp " ">
<!--  <!ENTITY fcron-download-ftp "ftp://ftp.seul.org/pub/fcron/fcron-&fcron-version;.src.tar.gz">-->
  <!ENTITY fcron-md5sum "4b031c2fba32a98fa814d1557158b0e9">
  <!ENTITY fcron-size "584 KB">
  <!ENTITY fcron-buildsize "5.1 MB">
  <!ENTITY fcron-time "0.1 SBU">
]>

<sect1 id="fcron" xreflabel="Fcron-&fcron-version;">
  <?dbhtml filename="fcron.html"?>

  <sect1info>
    <othername>$LastChangedBy: bdubbs $</othername>
    <date>$Date: 2015-02-26 20:29:00 -0500 (Thu, 26 Feb 2015) $</date>
  </sect1info>

  <title>Fcron-&fcron-version;</title>

  <indexterm zone="fcron">
    <primary sortas="a-Fcron">Fcron</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to Fcron</title>

    <para>The <application>Fcron</application> package contains a periodical
    command scheduler which aims at replacing <application>Vixie
    Cron</application>.</para>

    &lfs77_checked;

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>Download (HTTP): <ulink url="&fcron-download-http;"/></para>
      </listitem>
      <listitem>
        <para>Download (FTP): <ulink url="&fcron-download-ftp;"/></para>
      </listitem>
      <listitem>
        <para>Download MD5 sum: &fcron-md5sum;</para>
      </listitem>
      <listitem>
        <para>Download size: &fcron-size;</para>
      </listitem>
      <listitem>
        <para>Estimated disk space required: &fcron-buildsize;</para>
      </listitem>
      <listitem>
        <para>Estimated build time: &fcron-time;</para>
      </listitem>
    </itemizedlist>
<!--
    <bridgehead renderas="sect3">Additional Downloads</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          Required patch:
          <ulink url="&patch-root;/fcron-&fcron-version;-sendmail_upstream-1.patch"/>
        </para>
      </listitem>
    </itemizedlist>
-->
    <bridgehead renderas="sect3">Fcron Dependencies</bridgehead>

    <bridgehead renderas="sect4">Optional</bridgehead>
    <para role="optional">An <xref linkend="server-mail"/>,
    <ulink url="../postlfs/editors.html">text editor</ulink> (default is
    <command>vi</command> from the <xref linkend="vim"/> package),
    <xref linkend="linux-pam"/>, and
    <xref linkend="docbook-utils"/>
    </para>

    <para condition="html" role="usernotes">User Notes:
    <ulink url="&blfs-wiki;/fcron"/></para>

  </sect2>

  <sect2 role="installation">
    <title>Installation of Fcron</title>

    <para id="fcron-syslog"><application>Fcron</application> uses the cron facility
    of <command>syslog</command> to log all messages. Since LFS
    does not set up this facility in <filename>/etc/syslog.conf</filename>, it
    needs to be done prior to installing <application>Fcron</application>. This
    command will append the necessary line to the current
    <filename>/etc/syslog.conf</filename> (perform as the
    <systemitem class='username'>root</systemitem> user):</para>

    <indexterm zone="fcron fcron-syslog">
      <primary sortas="e-etc-syslog.conf">/etc/syslog.conf</primary>
    </indexterm>

<screen role="root"><userinput>cat &gt;&gt; /etc/syslog.conf &lt;&lt; "EOF"
<literal># Begin fcron addition to /etc/syslog.conf

cron.* -/var/log/cron.log

# End fcron addition</literal>
EOF</userinput></screen>

    <para>The configuration file has been modified, so reloading the
    <command>sysklogd</command> daemon will activate the changes (again as the
    <systemitem class='username'>root</systemitem> user).</para>

<screen role="root"><userinput>/etc/rc.d/init.d/sysklogd reload</userinput></screen>

    <para>For security reasons, an unprivileged user and group for
    <application>Fcron</application> should be created (perform as the
    <systemitem class='username'>root</systemitem> user):</para>

<screen role="root"><userinput>groupadd -g 22 fcron &amp;&amp;
useradd -d /dev/null -c "Fcron User" -g fcron -s /bin/false -u 22 fcron</userinput></screen>

    <para>Install <application>Fcron</application> by running the following
    commands:</para>

<screen><userinput>./configure --prefix=/usr          \
            --sysconfdir=/etc      \
            --localstatedir=/var   \
            --without-sendmail     \
            --with-boot-install=no \
            --with-systemdsystemunitdir=no &amp;&amp;
make</userinput></screen>

    <para>This package does not come with a test suite.</para>

    <para>Now, as the <systemitem class="username">root</systemitem> user:</para>

<screen role="root"><userinput>make install</userinput></screen>

    <para>DESTDIR install must be done as <systemitem class="username">root</systemitem> user.</para>

  </sect2>

  <sect2 role="commands">
    <title>Command Explanations</title>
<!--
    <para><command>autoconf</command>: This command is required to rebuild
    <filename>configure</filename> using the fixed input file.</para>-->

    <para><parameter>--without-sendmail</parameter>: By default,
    <application>Fcron</application> will attempt to use the
    <command>sendmail</command> command from an <xref linkend="server-mail"/>
    package to email you the results of the <command>fcron</command> script.
    This switch is used to disable default email notification. Omit the switch
    to enable the default. Alternatively, you can use the
    <option>--with-sendmail=<replaceable>&lt;/path/to/MTA
    command&gt;</replaceable></option> to use a different mailer command.</para>

    <para><parameter>--with-boot-install=no</parameter>: This prevents
    installation of the bootscript included with the package.</para>

    <para><parameter>--with-systemdsystemunitdir=no|yes|DIR</parameter>: Use
    no, if you use sysvint; yes, if you use systemd, or specify the directory
    DIR for the systemd units.</para>

    <para><option>--with-editor=<replaceable>&lt;/path/to/editor&gt;</replaceable></option>:
    This switch allows you to set the default text editor.</para>

    <para><option>--with-dsssl-dir=<replaceable>&lt;/path/to/dsssl-stylesheets&gt;</replaceable></option>:
    May be used if you have <xref linkend="docbook-utils"/> installed.
    Currently, the dsssl stylesheets are located at
    <filename class="directory">/usr/share/sgml/docbook/dsssl-stylesheets-1.79</filename>.</para>

  </sect2>

  <sect2 role="configuration">
    <title>Configuring Fcron</title>

    <sect3 id="fcron-config">
      <title>Config Files</title>

      <para><filename>/etc/fcron.conf</filename>,
      <filename>/etc/fcron.allow</filename>, and
      <filename>/etc/fcron.deny</filename></para>

      <indexterm zone="fcron fcron-config">
        <primary sortas="e-etc-fcron.conf">/etc/fcron.conf</primary>
      </indexterm>

      <indexterm zone="fcron fcron-config">
        <primary sortas="e-etc-fcron.allow">/etc/fcron.allow</primary>
      </indexterm>

      <indexterm zone="fcron fcron-config">
        <primary sortas="e-etc-fcron.deny">/etc/fcron.deny</primary>
      </indexterm>

    </sect3>

    <sect3>
      <title>Configuration Information</title>

      <para>There are no required changes in any of the config files.
      Configuration information can be found in the man page for
      <filename>fcron.conf</filename>.</para>

      <para><command>fcron</command> scripts are written using
      <command>fcrontab</command>. Refer to the <command>fcrontab</command> man
      page for proper parameters to address your situation.</para>

      <para id="fcron-pam">If <application>Linux-PAM</application>
      is installed, two PAM configuration files are installed in
      <filename class='directory'>/etc/pam.d</filename>. Alternatively if
      <filename class='directory'>/etc/pam.d</filename> is not used, the installation
      will append two configuration sections to the existing
      <filename>/etc/pam.conf</filename> file. You should ensure the files match your
      preferences. Modify them as required to suit your needs.</para>

      <indexterm zone="fcron fcron-pam">
        <primary sortas="e-etc-pam.d">/etc/pam.d/*</primary>
      </indexterm>

      <indexterm zone="fcron fcron-pam">
        <primary sortas="e-etc-pam.conf">/etc/pam.conf</primary>
      </indexterm>

    </sect3>

    <sect3  id="fcron-init">
      <title>Boot Script</title>

      <para>Install the <filename>/etc/rc.d/init.d/fcron</filename>
      init script from the <xref linkend="bootscripts"/>
      package.</para>

      <indexterm zone="fcron fcron-init">
        <primary sortas="f-fcron">fcron</primary>
      </indexterm>

<screen role="root"><userinput>make install-fcron</userinput></screen>

    </sect3>

  </sect2>

  <sect2 role="content">
    <title>Contents</title>

    <segmentedlist>
      <segtitle>Installed Programs</segtitle>
      <segtitle>Installed Libraries</segtitle>
      <segtitle>Installed Directories</segtitle>

      <seglistitem>
        <seg>fcron, fcrondyn, fcronsighup, and fcrontab</seg>
        <seg>None</seg>
        <seg>/usr/share/doc/fcron-&fcron-version; and /var/spool/fcron</seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="fcron-prog">
        <term><command>fcron</command></term>
        <listitem>
          <para>is the scheduling daemon.</para>
          <indexterm zone="fcron fcron-prog">
            <primary sortas="b-fcron">fcron</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="fcrondyn">
        <term><command>fcrondyn</command></term>
        <listitem>
          <para>is a user tool intended to interact with a running
          <command>fcron</command> daemon.</para>
          <indexterm zone="fcron fcrondyn">
            <primary sortas="b-fcrondyn">fcrondyn</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="fcronsighup">
        <term><command>fcronsighup</command></term>
        <listitem>
          <para>instructs <command>fcron</command> to reread the
          <application>Fcron</application> tables.</para>
          <indexterm zone="fcron fcronsighup">
            <primary sortas="b-fcronsighup">fcronsighup</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="fcrontab">
        <term><command>fcrontab</command></term>
        <listitem>
          <para>is a program used to install, edit, list and remove the
          tables used by <command>fcron</command>.</para>
          <indexterm zone="fcron fcrontab">
            <primary sortas="b-fcrontab">fcrontab</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>
