This is a static helper class that collects some common methods to interact with
the OpenXPKI system.
Parameters common to all methods:
- filesystem path to the config git repository
- set to 1 to surpress any output
All methods are static and return 0 on success, 1 on configuration
errors and 2 on system errors.
All Parameters to methods are optional, if no parameters are given
the OpenXPKI::Config Layer is intanciated and queried for the needed
Start the server.
Stop the server
- PID Pid to check for a running server
- FOREGROUND (0|1) Weather to start the daemon in foreground (implies
- RESTART (0|1) Weather to restart a running server
- DEBUG_LEVEL hashref: module => level
- DEBUG_BITMASK hashref: module => bitmask
- DEBUG_NOCENSOR (0|1) turn of censoring of debug messages
- KEEP_TEMP (0|1) Weather to not delete temp files
- !!THIS MIGHT BE A SECURITY RISK !! as files might contain private
keys or other confidential data!
Check if the server is running
- PID or PIDFILE
Reload some parts of the config (sends a HUP to the server pid)
- Wait sleep seconds before testing
Get a list of all process belonging to this instance
- PID or PIDFILE
Returns a hash with keys:
Get a list of all running workers with pid, time and info
- Holding the pid of the main server process.
- List of running watchdog process. Usually this is only a single pid but
can also have more than one. If empty, the watchdog was either disabled or
terminated due to too many internal errors.
- List of pids of running session workers (connected to the socket). This
might also be empty if no process is running.
- List of pids of all workers currently handling workflows (contains
watchdog and user initiated requests).