Install a Daemon Script
At this point you have successfully installed the
Content Store
and managed its instances using the ece
script. Now
you may want to install a daemon script that will automatically run
the
Content Store
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:
-
Copy the daemon script
ece
to/etc/init.d/
, and the script's default settings (ece-scripts/etc/default/ece
) to a file calledece
in the/etc/default
folder. On the assembly-host you can do this as follows:#
cp engine-installation/ece-scripts/etc/init.d/ece /etc/init.d/#
cp engine-installation/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:engine-installation/ece-scripts/etc/init.d/ece /etc/init.d/#
scp escenic@assembly-host-ip-address:engine-installation/ece-scripts/etc/default/ece /etc/default/ -
Make the daemon script executable:
#
chmod +x /etc/init.d/ece -
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 Store files in standard locations, then you must modify the dir_list setting according to the
/etc/escenic/ece.conf
.Now, if you have started the Content Store, stop it.
#
ece stopThen enter the following commands:
#
sudo /etc/init.d/ece startIf 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.
-
On your engine-hosts only, enter the following commands:
#
update-rc.d ece defaultsThis 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.