Added more logging when a monitor script cannot be executed.

This commit is contained in:
Markus Makela
2015-05-20 16:16:49 +03:00
parent b815a79628
commit 7dbc021149
6 changed files with 67 additions and 7 deletions

View File

@ -170,7 +170,17 @@ startMonitor(void *arg, void* opt)
{
if(handle->script)
free(handle->script);
handle->script = strdup(params->value);
if(access(params->value,X_OK) == 0)
{
handle->script = strdup(params->value);
}
else
{
skygw_log_write(LE,
"Error: The file cannot be executed: %s",
params->value);
handle->script = NULL;
}
}
else if(!strcmp(params->name,"events"))
{