%%CONTROL_SCRIPT_MANPAGE_TITLE%%(1)

NAME
%%CONTROL_SCRIPT_NAME%% - %%APP_TITLE%% server control interface

SYNOPSIS
%%CONTROL_SCRIPT_NAME%% [start | restart | stop]

DESCRIPTION
The %%CONTROL_SCRIPT_NAME%% program provides an interface to the %%APP_TITLE%% application server.

The program expects exactly one argument, either start, restart or stop. If more than one argument is given, then all arguments but the first are ignored.

start
    Start %%APP_TITLE%%, if it is not already running.

restart
    Restart %%APP_TITLE%%. If it is already running, then it will be stopped and then started right after that. Otherwise it will just be started up.

stop
    Stop %%APP_TITLE%%, if it is actually running.

ERRORS
The following error conditions are detected. They will be checked in the specified order. In each case an error message is printed with the name of the control program prepended.

If no argument is passed, then a simple help message is printed and the program exists with error code 0.

If at least one argument is passed, but it is different from start, restart or stop then the help message is printed as well, and the program exits with error code 1.

The following errors conditions are defined:

Illegal program argument (error code 1)

PID file not found (error code 2)

PID file too large (error code 3)

PID file contains illegal character (error code 4)

Kill of process failed (error code 5)

%%APP_TITLE%% is already running (error code 6)

%%APP_TITLE%% is not running (error code 7)

Unable to chdir to the %%APP_TITLE%% home directory (error code 8)

Unable to open the stdout log file (error code 9)

Unable to open the stderr log file (error code 10)

Unable to start %%APP_TITLE%% (error code 11)

FILES

%%PID_FILE%%
    The %%APP_TITLE%% PID file that is used to store the process ID of the currently running process in. It is emptied as soon as the server is stopped and filled with the process ID when it is started. It should never be writable for anyone but www,

%%STARTUP_SCRIPT%%
    A script that starts the %%CONTROL_SCRIPT_NAME%% program. It is used to start %%APP_TITLE%% at startup time.

AUTHORS
Ernst de Haan <znerd@FreeBSD.org>