In normal operation, MonAMI will detach itself and run
independently as a background task. Typically, one would want
to run MonAMI automatically when a computer starts up. The de
facto method of achieving this is with
init scripts. MonAMI includes a
suitable script, which is stored in the
/home/paul/MonAMI-test-install/etc/init.d
directory.
When installing MonAMI (either with the RPM package or manually
with "make install") a suitable "init script" will be installed
in the /home/paul/MonAMI-test-install/etc/init.d
directory. Once this is
done, a further two steps are needed: to register the new init
script with the system and "switch on" MonAMI. On RedHat-like
machines, this is achieved with the following two commands:
chkconfig monami on
To manually start or stop MonAMI, one can use the init scripts,
with either the start
or stop
option. You can either execute the script directly:
/etc/init.d/monami start
or using the "service" command.
service monami start
The complete list of arguments the init script accepts is:
start
Unconditionally attempt to start monamid. If monamid is already running, this attempt will fail.
stop
Unconditionally stops monamid. If the application is not already running, then this will (obviously) fail.
reload
Signals MonAMI to reload its configuration. This will only happen if monamid is running: if the application is not running, this will fail. The reload is achieved without stopping and starting monamid.
restart
Unconditionally stop and start MonAMI. If monamid was not running, an error is reported and the application is started.
condrestart
If MonAMI is running, then stop monamid and restart it. If the application is not running, then no action is taken.