The init program starts every time the computer is booted.
A line in init's configuration file, /etc/inittab, tells init to run, and to restart if necessary, svscanboot.
svscanboot checks the directory /service every few seconds. If it sees a subdirectory there, it looks for a file in the subdirectory called run. Hence, the aolserver instance for your development server is started by the file /service/openacs-dev/run. But we use a symlink to make it easier to add and remove stuff from the /service, so the actual location is /usr/local/aolserver/daemontools/openacs-dev/run.
When aolserver starts, it uses a control file to figure out what to do. The run file tells it which control file to use, and that file is /usr/local/aolserver/openacs-dev.tcl. The aolserver control file specifies many interesting things, including the location of the aolserver logs. Aolserver errors and status information are written to /usr/local/aolserver/log/openacs-dev-error.log. The http server log, i.e. the list of incoming requests, is at /usr/local/aolserver/log/openacs-dev.log
Aolserver also uses the PostgreSQL database. The database server is controlled by the System V init scripts; these are the files and links in /etc/init.d.
Table 2.1. How it Works
| Program | Invoked by this program ... | ... using this file | Where to find errors | Log goes to | Use these commands to control it |
|---|---|---|---|---|---|
| svscanboot | init | /etc/inittab | ps -auxw | grep readproctitle | n/a | |
| aolserver | supervise (a child of svscanboot) | /service/openacs-dev/run | /usr/local/aolserver/log/openacs-dev-error.log | /usr/local/aolserver/log/openacs-dev.log | svc -d /server/openacs-dev restart-aolserver openacs-dev |
| postgresql | Redhat init scripts during boot | /etc/init.d/postgresql | /usr/local/pgsql/data/server.log | service postgresql |