diff --git a/main.c b/main.c index c2e2834..5a411fb 100644 --- a/main.c +++ b/main.c @@ -219,6 +219,7 @@ int readconfig( struct config * cfg ) } if (cfg->commande[0] == 0) { + strcpy(cfg->commande,"no command found"); printf("command not found in config file: no command will be executed\n"); retval += 4; } @@ -559,13 +560,8 @@ int main() id=fork(); if(id == 0) { - if (cfg.commande[0] != 0) - { - r = system( str ); - }else - { - printlog("no command defined: no command launched", WARNING, 0); - } + r = system( str ); + printlog("str", WARNING, 0); exit(r); }else if( id<0 ) {