123 |
char *auth= get_basic_authentication_header(); |
char *auth= get_basic_authentication_header(); |
124 |
ssl_connection * ssl= NULL; |
ssl_connection * ssl= NULL; |
125 |
|
|
126 |
|
ASSERT(P); |
127 |
|
ASSERT(action); |
128 |
|
|
129 |
if ( Run.httpdssl ) { |
if ( Run.httpdssl ) { |
130 |
|
|
131 |
ssl = new_ssl_connection(Run.httpsslpem); |
ssl = new_ssl_connection(Run.httpsslpem); |
197 |
if( toggle_validate_flag ) { |
if( toggle_validate_flag ) { |
198 |
|
|
199 |
if( is(action, "start")) { |
if( is(action, "start")) { |
200 |
|
|
201 |
|
if(Run.debug) |
202 |
|
log("Starting monitoring -- process %s\n", p->name); |
203 |
|
|
204 |
LOCK(Run.mutex) |
LOCK(Run.mutex) |
205 |
p->do_validate= TRUE; |
p->do_validate= TRUE; |
206 |
END_LOCK; |
END_LOCK; |
207 |
} |
} |
208 |
|
|
209 |
if( is(action, "stop")) { |
if( is(action, "stop")) { |
210 |
|
|
211 |
|
if(Run.debug) |
212 |
|
log("Stoping monitoring -- process %s\n", p->name); |
213 |
|
|
214 |
LOCK(Run.mutex) |
LOCK(Run.mutex) |
215 |
p->do_validate= FALSE; |
p->do_validate= FALSE; |
216 |
END_LOCK; |
END_LOCK; |
223 |
* pick up the parent process and start the dependants. |
* pick up the parent process and start the dependants. |
224 |
*/ |
*/ |
225 |
if(is(action, "start")) { |
if(is(action, "start")) { |
226 |
|
|
227 |
|
if(!p->start) { |
228 |
|
error("%s: Start method not defined -- process %s\n", |
229 |
|
prog, P); |
230 |
|
return; |
231 |
|
} |
232 |
|
|
233 |
if( p->parent != NULL ) { |
if( p->parent != NULL ) { |
234 |
if( !is_process_running(get_process(p->parent)) ) { |
if( !is_process_running(get_process(p->parent)) ) { |
239 |
} |
} |
240 |
} |
} |
241 |
|
|
242 |
|
if(is(action, "stop")) { |
243 |
|
|
244 |
|
if(!p->stop) { |
245 |
|
error("%s: Stop method not defined -- process %s\n", |
246 |
|
prog, P); |
247 |
|
return; |
248 |
|
} |
249 |
|
|
250 |
|
} |
251 |
|
|
252 |
control_process(p, action, toggle_validate_flag); |
control_process(p, action, toggle_validate_flag); |
253 |
|
|
254 |
} |
} |