/[monit]/monit/monitor.c
ViewVC logotype

Diff of /monit/monitor.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.67 by martinp, Sun Sep 14 11:27:05 2003 UTC revision 1.68 by martinp, Sun Sep 14 17:07:11 2003 UTC
# Line 96  static int   do_wakeupcall(); Line 96  static int   do_wakeupcall();
96  static void  handle_options(int, char **);         /* Handle program options */  static void  handle_options(int, char **);         /* Handle program options */
97  static void  help();                 /* Print program help message to stdout */  static void  help();                 /* Print program help message to stdout */
98  static void  version();                         /* Print version information */  static void  version();                         /* Print version information */
 static void  stop_http();                                 /* Stop monit http */  
 static void  start_http();                               /* Start monit http */  
99    
100    
101  /* ------------------------------------------------------------------ Public */  /* ------------------------------------------------------------------ Public */
# Line 316  static void do_reinit() { Line 314  static void do_reinit() {
314        
315    if(! can_http()) {    if(! can_http()) {
316                        
317      stop_http();      monit_http(STOP_HTTP);
318                        
319    } else if(!IS(bind_addr, Run.bind_addr) || port != Run.httpdport) {    } else if(!IS(bind_addr, Run.bind_addr) || port != Run.httpdport) {
320                        
321      stop_http();      monit_http(STOP_HTTP);
322      start_http();      monit_http(START_HTTP);
323                        
324    } else if(! check_httpd()) {    } else if(! check_httpd()) {
325    
326      start_http();      monit_http(START_HTTP);
327                        
328    }    }
329    
# Line 548  static RETSIGTYPE do_destroy(int sig) { Line 546  static RETSIGTYPE do_destroy(int sig) {
546        /* Fall trough */        /* Fall trough */
547    case SIGTERM:    case SIGTERM:
548        if(Run.isdaemon && !Run.validate) {        if(Run.isdaemon && !Run.validate) {
549          if(Run.dohttpd) stop_http();          if(Run.dohttpd) monit_http(STOP_HTTP);
550          log("%s daemon with pid [%d] killed\n", prog, (int)getpid());          log("%s daemon with pid [%d] killed\n", prog, (int)getpid());
551          finalize_files();          finalize_files();
552          state_finalize();          state_finalize();
# Line 594  static void do_default() { Line 592  static void do_default() {
592        state_update();        state_update();
593            
594      if(can_http())      if(can_http())
595        start_http();        monit_http(START_HTTP);
596            
597      for(;;) {      for(;;) {
598    
# Line 787  static void version() { Line 785  static void version() {
785    
786  }  }
787    
   
 /**  
  * Stop monit http  
  */  
 static void stop_http() {  
   
   monit_http(STOP_HTTP);  
   
 }  
   
   
 /**  
  * Start monit http  
  */  
 static void start_http() {  
   
   monit_http(START_HTTP);  
   
 }  

Legend:
Removed from v.1.67  
changed lines
  Added in v.1.68

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26