Install a Daemon Script

At this point you have successfully installed the Content Engine and managed its instances using the ece script. Now you may want to install a daemon script that will automatically run the Content Engine on system start-up and shut it down on system shutdown. If you have the database server on the same machine then you have to make sure that it also starts automatically on system start-up.

The following instructions tell you how to install the daemon script.

Log in as root on your assembly-host and on each of your engine-hosts and do the following:

  1. Copy the daemon script ece to /etc/init.d/, and the script's default settings (ece-scripts/etc/default/ece) to a file called ece in the /etc/default folder. On the assembly-host you can do this as follows:

    # cp /opt/escenic/engine/ece-scripts/etc/init.d/ece /etc/init.d/
                # cp /opt/escenic/engine/ece-scripts/etc/default/ece /etc/default/

    On the engine-hosts, however, you will have to copy the files from the assembly-host. If you have installed an SSH server on the assembly-host and SSH clients on your engine-hosts, then you can do it as follows:

    # scp escenic@assembly-host-ip-address:/opt/escenic/engine/ece-scripts/etc/init.d/ece /etc/init.d/
                # scp escenic@assembly-host-ip-address:/opt/escenic/engine/ece-scripts/etc/default/ece /etc/default/
  2. Make the daemon script executable:

    # chmod +x /etc/init.d/ece
  3. The next step is to run the daemon script, ece. But before that you may need to modify the settings for the daemon script. Open /etc/default/ece in an editor and modify the settings to meet your requirements.

    If you have not installed the Content Engine files in standard locations, then you must modify the dir_list setting according to the /etc/escenic/ece.conf, i.e. the directories you have created while installing the ece script. See Install the ece Script.

    Now, if you have started the Content Engine, stop it.

    # ece stop

    Then enter the following commands:

    # sudo /etc/init.d/ece start

    If everything is ok at this point, then your are ready to add this script as a daemon. Other wise you need to fix the problem and then try again.

  4. On your engine-hosts only, enter the following commands:

    # update-rc.d ece defaults

    This command actually installs the script as a daemon, ensuring that it will be run on system startup. Note that this command is specific to Debian-based Linux distributions: the procedure for installing daemon scripts is different on other distributions.