diff --git a/cronjob/chart/chart.c b/cronjob/chart/chart.c index 94b7e7a..55c431b 100644 --- a/cronjob/chart/chart.c +++ b/cronjob/chart/chart.c @@ -102,6 +102,7 @@ int main(int argc, char *argv[]){ DEBUGOUT2(" User: = %s\n",global_opts.pg_user); DEBUGOUT2(" Pass: = %s\n",global_opts.pg_pass); DEBUGOUT2(" Datenbank = %s\n",global_opts.pg_database); + DEBUGOUT2(" Timeout = %s\n",global_opts.pg_database); if(walk_image_cfg_list()) wait_for_childs(NULL); diff --git a/cronjob/chart/common.h b/cronjob/chart/common.h index e7d83fa..dd86ef7 100644 --- a/cronjob/chart/common.h +++ b/cronjob/chart/common.h @@ -31,6 +31,7 @@ typedef struct image_cfg_list_t { typedef struct config_t { char *pg_host; char *pg_database; + char *pg_timeout; char *pg_user; char *pg_pass; char *image_cfg_location; diff --git a/cronjob/chart/config.c b/cronjob/chart/config.c index 9b9730e..c5bffa0 100644 --- a/cronjob/chart/config.c +++ b/cronjob/chart/config.c @@ -50,6 +50,7 @@ static const config_keyword dflt_keywords[] = { {"pg_user", read_str, &(global_opts.pg_user), DEFAULT_PG_USER}, {"pg_pass", read_str, &(global_opts.pg_pass), DEFAULT_PG_PASS}, {"pg_database", read_str, &(global_opts.pg_database), DEFAULT_PG_DATABASE}, + {"pg_timeout", read_str, &(global_opts.pg_timeout), DEFAULT_PG_TIMEOUT}, {"", NULL, NULL, ""} }; diff --git a/cronjob/chart/definitions.h b/cronjob/chart/definitions.h index b9a0922..1b61143 100644 --- a/cronjob/chart/definitions.h +++ b/cronjob/chart/definitions.h @@ -25,6 +25,7 @@ #define DEFAULT_PG_USER "localuser" /* Postgres-Username */ #define DEFAULT_PG_PASS "" /* Postgres-Passwort */ #define DEFAULT_PG_DATABASE "localbase" /* Postgres-Datenbank */ +#define DEFAULT_PG_TIMEOUT "20" /* Postgres-Timeout */ #define DEFAULT_CONFIG_FILE "./chart.conf" /* Standart-Configdatei */