This are the main databases for this time 14Feb05.


Active Database, a database to save all running and up services in, * the main db*
active db active_h
---------------------------------------------------------------------------------------
char *name             <---  Name of service
service_h *from_service<---  Pointer to the service db on matching entry.
a_status_h a_status    <---  Status of this service up or down or others.
time_t startedate      <---  Service start time
time_t stopedate       <---  Service stop time
active_h father        <---  A pointer to service that needed this service up if any
process_h start_process<---  Pointer to process start if any
process_h stop_process <---  Pointer to process stop if any
process_h log_process  <---  Pointer to process log if any



Process Database, a temporary db for active processes
Temporary acsess to a process, running
process db process_h
---------------------------------------------------------------------------------------
char *exec             <---  Script/file to execute
char *exec_args        <---  Arguments to execute with
pit_t pid              <---  Process pid number, know what to kill, and check..
p_status_h p_status    <---  A process status value mostly Running, Notrunning, Fail...
int stdin              <---  stream id for this services input
int stdout             <---  stream id for this services output


Service Databasee, db to access service data from
should be a storage...
service db service_h
---------------------------------------------------------------------------------------
char *name             <---  Service Name
s_type_h type          <---  What type of entry in service db is this, a class runlevel or?
char *from_filename    <---  Record filename wher we got this record from.
char *depends          <---  Dependncies this service requires to be filld
char *rdepends         <---  Revese dependencies, what needs to be stoped before...
char *start            <---  Command to execute to start service
char *start_args       <---  Arguments to start execute
char *stop             <---  Command to execute to take service down.
char *stop_args        <---  Arguments to stop execute
char *log_daemon       <---  A program that starts and get the output from this service..
char *pid_file         <---  Path to pidfile.
bool respawn           <---  Will deamon restart on exit
bool disable           <---  Is this service disabled?
uns char when_up       <---  Is the service up when *start* is started or when it exits?



Written by Jimmy Wennlund <jimmy.wennlund@gmail.com>
