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

Diff of /monit/monitor.c

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

revision 1.49 by hauk, Sun Mar 2 14:15:22 2003 UTC revision 1.50 by hauk, Fri Jun 6 16:43:06 2003 UTC
# Line 290  static void do_reinit() { Line 290  static void do_reinit() {
290                        
291      stop_http();      stop_http();
292                        
293    } else if(!is(bind_addr, Run.bind_addr) || port != Run.httpdport) {    } else if(!IS(bind_addr, Run.bind_addr) || port != Run.httpdport) {
294                        
295      stop_http();      stop_http();
296      start_http();      start_http();
# Line 318  static void do_action(char **args) { Line 318  static void do_action(char **args) {
318            
319      do_default();      do_default();
320            
321    } else if(is(action, "start")) {    } else if(IS(action, "start")) {
322            
323      if(P) {      if(P) {
324        if(exist_daemon()) {        if(exist_daemon()) {
# Line 334  static void do_action(char **args) { Line 334  static void do_action(char **args) {
334          control("start");          control("start");
335      }      }
336        
337    } else if(is(action, "stop")) {    } else if(IS(action, "stop")) {
338            
339      if(P) {      if(P) {
340        if(exist_daemon()) {        if(exist_daemon()) {
# Line 350  static void do_action(char **args) { Line 350  static void do_action(char **args) {
350          control("stop");          control("stop");
351      }      }
352            
353    } else if(is(action, "reload")) {    } else if(IS(action, "reload")) {
354            
355      error("Reinitializing monit daemon\n", prog);      error("Reinitializing monit daemon\n", prog);
356      kill_daemon(SIGHUP);      kill_daemon(SIGHUP);
357            
358    } else if(is(action, "restart")) {    } else if(IS(action, "restart")) {
359            
360      if(P) {      if(P) {
361                
# Line 382  static void do_action(char **args) { Line 382  static void do_action(char **args) {
382            control("restart");            control("restart");
383      }      }
384            
385    } else if(is(action, "status")) {    } else if(IS(action, "status")) {
386            
387      if(Run.mygroup) {      if(Run.mygroup) {
388        status_group(Run.mygroup);        status_group(Run.mygroup);
# Line 390  static void do_action(char **args) { Line 390  static void do_action(char **args) {
390        status();        status();
391      }      }
392            
393    } else if(is(action, "quit")) {    } else if(IS(action, "quit")) {
394            
395      error("Stopping monit daemon\n", prog);      error("Stopping monit daemon\n", prog);
396      kill_daemon(SIGTERM);      kill_daemon(SIGTERM);
397            
398    } else if(is(action, "validate")) {    } else if(IS(action, "validate")) {
399            
400      validate();      validate();
401            
# Line 596  static void handle_options(int argc, cha Line 596  static void handle_options(int argc, cha
596                    
597      case 'l':      case 'l':
598          Run.logfile= xstrdup(optarg);          Run.logfile= xstrdup(optarg);
599          if(is(Run.logfile, "syslog"))          if(IS(Run.logfile, "syslog"))
600              Run.use_syslog= TRUE;              Run.use_syslog= TRUE;
601          Run.dolog= TRUE;          Run.dolog= TRUE;
602          break;          break;

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50

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