|
NameOpenXPKI::Server::Init - daemon initializationDescriptionThis class is used to initialize all the objects which are required. The code is not in the server class itself to get a clean interface for the initialization and to avoid any "magic" stuff. We hope that this makes the customization of the code more easier.FunctionsBasic InitializationinitInitialization must be done ONCE by the server process. Expects the XML configuration file via the named parameter CONFIG. Usage: use OpenXPKI::Server::Init; OpenXPKI::Server::Init::init({ CONFIG => 't/config.xml', }); If called this way, the init code processes all initialization steps. You may split the initialization sequence in order to do stuff in between steps by providing an array reference TASKS as a named argument: OpenXPKI::Server::Init::init({ CONFIG => 't/config.xml', TASKS => [ 'config', 'i18n', 'log' ], }); and later simply call OpenXPKI::Server::Init::init({ CONFIG => 't/config.xml', }); to initialize the remaining tasks. If called without the TASKS argument the function will perform all steps that were not already executed before. If called with the named argument SILENT set to a true value the init method does not log successful initialization steps. get_remaining_init_tasks Returns an array of all remaining initialization task names (i. e. all tasks that have not yet been executed) in the order they would normally be processed. get_workflow_factory Returns a workflow factory which already has the configuration added from the configuration files and is ready for use. get_config expects as only parameter the option CONFIG. This must be a filename of an XML configuration file which is compliant with OpenXPKI's schema definition in openxpki.xsd. We support local xinclude so please do not be surprised if you habe a configuration file which looks a little bit small. It returns an instance of OpenXPKI::XML::Config. init_i18n Initializes the code for internationalization. It requires an instance of OpenXPKI::XML::Config in the parameter CONFIG. reset Resets the initialization state. Used to re-initialize the server in tests. Cryptographic Initializationget_crypto_layerReturn an instance of the TokenManager class which handles all configured cryptographic tokens. Non-Cryptographic Object Initializationget_logReturns an instance of the module OpenXPKI::Log. Requires 'config' in the Server Context. get_database Returns an instance of the OpenXPKI::Server::Database. A section name must be given below the config path system.database. Requires 'log' in the Server Context. redirect_stderr requires no arguments and is a simple function to send STDERR to configured file. This is useful to track all warnings and errors.
Visit the GSP FreeBSD Man Page Interface. |