| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- Index: files.c
- --- files.c.orig 2003-10-25 21:17:10.000000000 +0200
- +++ files.c 2003-10-27 15:23:38.000000000 +0100
- @@ -160,8 +160,8 @@
-
- /**
- * Search the system for the monit control file. Try first ~/.monitrc,
- - * if that fails try /etc/monitrc and finally ./monitrc. Exit the
- - * application if the control file is not found.
- + * if that fails try @l_prefix@/etc/monit/monitrc and finally ./monitrc.
- + * Exit the application if the control file is not found.
- * @return The location * of monits control file (monitrc)
- */
- char *find_rcfile() {
- @@ -177,7 +177,7 @@
- }
-
- memset(rcfile, 0, STRLEN);
- - snprintf(rcfile, STRLEN, "/etc/%s", MONITRC);
- + snprintf(rcfile, STRLEN, "@l_prefix@/etc/monit/%s", MONITRC);
-
- if(exist_file(rcfile)) {
-
- @@ -194,7 +194,7 @@
-
- }
-
- - log("%s: Cannot find the control file at ~/.%s, /etc/%s or at ./%s \n",
- + log("%s: Cannot find the control file at ~/.%s, @l_prefix@/etc/monit/%s or at ./%s \n",
- prog, MONITRC, MONITRC, MONITRC);
-
- exit(1);
- Index: monit.1
- --- monit.1.orig 2003-10-27 13:31:11.000000000 +0100
- +++ monit.1 2003-10-27 15:24:32.000000000 +0100
- @@ -309,7 +309,7 @@
- .IX Header "HOW TO MONITOR"
- monit is configured and controlled via a control file called
- \&\fBmonitrc\fR. The default location for this file is ~/.monitrc. If
- -this file does not exist, monit will try /etc/monitrc and finally
- +this file does not exist, monit will try @l_prefix@/etc/monit/monitrc and finally
- \&./monitrc.
- .PP
- A monit control file consists of a series of service entries and
- @@ -435,7 +435,7 @@
- .PP
- .Vb 2
- \& # Run monit in standard run-levels
- -\& mo:2345:respawn:/usr/local/bin/monit -Ic /etc/monitrc
- +\& mo:2345:respawn:/usr/local/bin/monit -Ic @l_prefix@/etc/monit/monitrc
- .Ve
- After you have modified init's configuration file, you can run
- the following command to re-examine /etc/inittab and start monit:
- @@ -2682,7 +2682,7 @@
- .IX Item "4. monit starts the node group"
- .PD
- .PP
- -\&\fBMonit: \f(BI/etc/monitrc\fB\fR
- +\&\fBMonit: \f(BI@l_prefix@/etc/monit/monitrc\fB\fR
- .PP
- This example describes a cluster with 2 nodes. Services running
- on Node 1 are in the group \fInode1\fR and Node 2 services are in
- @@ -2764,7 +2764,7 @@
- .PP
- .Vb 2
- \& #/etc/inittab
- -\& mo:2345:respawn:/usr/local/bin/monit -d 10 -c /etc/monitrc -g local
- +\& mo:2345:respawn:/usr/local/bin/monit -d 10 -c @l_prefix@/etc/monit/monitrc -g local
- .Ve
- \&\fBheartbeat: \f(BI/etc/ha.d/haresources\fB\fR
- .PP
- @@ -2836,9 +2836,9 @@
- \&\fI~/.monitrc\fR
- Default run control file
- .PP
- -\&\fI/etc/monitrc\fR
- +\&\fI@l_prefix@/etc/monit/monitrc\fR
- If the control file is not found in the default
- - location and /etc contains a \fImonitrc\fR file, this
- + location and @l_prefix@/etc/monit contains a \fImonitrc\fR file, this
- file will be used instead.
- .PP
- \&\fI./monitrc\fR
- @@ -2851,14 +2851,10 @@
- Lock file to help prevent concurrent runs (non-root
- mode).
- .PP
- -\&\fI/var/run/monit.pid\fR
- +\&\fI@l_prefix@/var/monit/monit.pid\fR
- Lock file to help prevent concurrent runs (root mode,
- Linux systems).
- .PP
- -\&\fI/etc/monit.pid\fR
- - Lock file to help prevent concurrent runs (root mode,
- - systems without /var/run).
- -.PP
- \&\fI~/.monit.state\fR
- monit save its state to this file and utilize
- information found in this file to recover from
|