WebHare bootstrap

This document attemps to give an outline of the current WebHare startup process. It may go out of date fast, so always check the code too

Using PostgreSQL

Database selection, first of:

  1. If the postgresql data dir exists, WebHare will select the PostgreSQL database server
  2. If the dbase dir exists, WebHare will select dbserver
  3. If WEBHARE_INITIALDB is set to postgresql, WebHare will select PostgreSQL
  4. WebHare will select dbserver

To initialize with postgresql (make sure you don't have a dbase directory yet!)

WEBHARE_INITIALDB=postgresql wh console

Service bootstrap

The steps taken to get WebHare running, and at what point various startup scripts are invoked

If webhare_testsuite is installed, poststart is responsible for setting up the test sites.

Use wh waitfor poststartdone if you need to wait for initialization tasks (and the creation of the test sites) to complete.

You can set WEBHARE_DEBUGSTARTUP=1 in the environment to set the startup process into debugging mode

The RestartReset procedure

See restart_reset.whlib.

Starts the various modules in the following groups:

For every module group applies their database definitions, and runs the following startupscripts in this order:

It will then proceed to recompile all site profiles, and wait for it to complete.

Broadcasts various events so everyone know there has been a softreset. This will trigger the webserver to reload its configuration, the adhoccahe to flush, etc


If WebHare doesn't seem to fully start (eg 'Online' doesn't appear and the webhareservice-startup script doesn't finish) you may be able to debug it by manually starting the debugmanager with wh run mod::system/scripts/internal/debugmgr.whscr and opening the debugger in the webserver.