308 |
pthread_t thread; |
pthread_t thread; |
309 |
|
|
310 |
log("start: (%s) %s\n", s->name, s->start->arg[0]); |
log("start: (%s) %s\n", s->name, s->start->arg[0]); |
311 |
spawn(s, s->start); |
spawn(s, s->start, "Started"); |
312 |
if(s->type==TYPE_PROCESS) { |
if(s->type==TYPE_PROCESS) { |
313 |
/* We only wait for a process type, other service types does not |
/* We only wait for a process type, other service types does not |
314 |
* have a pid file to watch */ |
* have a pid file to watch */ |
348 |
|
|
349 |
if(s->stop && (s->type!=TYPE_PROCESS || is_process_running(s))) { |
if(s->stop && (s->type!=TYPE_PROCESS || is_process_running(s))) { |
350 |
log("stop: (%s) %s\n", s->name, s->stop->arg[0]); |
log("stop: (%s) %s\n", s->name, s->stop->arg[0]); |
351 |
spawn(s, s->stop); |
spawn(s, s->stop, "Stopped"); |
352 |
|
|
353 |
if(s->type==TYPE_PROCESS) { |
if(s->type==TYPE_PROCESS) { |
354 |
/* Only wait for process service types */ |
/* Only wait for process service types */ |