You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
2.5 KiB
83 lines
2.5 KiB
Index: configure |
|
--- configure.orig 2011-12-20 21:40:44.000000000 +0100 |
|
+++ configure 2011-12-21 20:16:14.000000000 +0100 |
|
@@ -11330,6 +11330,7 @@ |
|
|
|
|
|
for ac_header in \ |
|
+ sys/types.h \ |
|
alloca.h \ |
|
arpa/inet.h \ |
|
asm/page.h \ |
|
Index: monit.1 |
|
--- monit.1.orig 2011-12-20 21:41:18.000000000 +0100 |
|
+++ monit.1 2011-12-21 20:16:14.000000000 +0100 |
|
@@ -3948,9 +3948,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 |
|
@@ -3963,14 +3963,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 |
|
Index: src/file.c |
|
--- src/file.c.orig 2011-12-20 21:40:30.000000000 +0100 |
|
+++ src/file.c 2011-12-21 20:17:52.000000000 +0100 |
|
@@ -104,6 +104,9 @@ |
|
|
|
/* Set the location of monit's state file */ |
|
if(Run.statefile == NULL) { |
|
+ if(!getuid()) |
|
+ snprintf(buf, STRLEN, "%s/%s", MYSTATEDIR, MYSTATEFILE); |
|
+ else |
|
snprintf(buf, STRLEN, "%s/.%s", Run.Env.home, MYSTATEFILE); |
|
Run.statefile= Str_dup(buf); |
|
} |
|
@@ -174,15 +177,7 @@ |
|
if(file_exist(rcfile)) { |
|
return rcfile; |
|
} |
|
- snprintf(rcfile, STRLEN, "/etc/%s", MONITRC); |
|
- if(file_exist(rcfile)) { |
|
- return rcfile; |
|
- } |
|
- snprintf(rcfile, STRLEN, "%s/%s", SYSCONFDIR, MONITRC); |
|
- if(file_exist(rcfile)) { |
|
- return rcfile; |
|
- } |
|
- snprintf(rcfile, STRLEN, "/usr/local/etc/%s", MONITRC); |
|
+ snprintf(rcfile, STRLEN, "@l_prefix@/etc/monit/%s", MONITRC); |
|
if(file_exist(rcfile)) { |
|
return rcfile; |
|
} |
|
Index: src/monit.h |
|
--- src/monit.h.orig 2011-12-20 21:40:30.000000000 +0100 |
|
+++ src/monit.h 2011-12-21 20:16:45.000000000 +0100 |
|
@@ -107,6 +107,7 @@ |
|
/* Set pid file mode: "-rw-r--r--" */ |
|
#define MYPIDMASK 0122 |
|
#define MYPIDDIR PIDDIR |
|
+#define MYSTATEDIR PIDDIR |
|
#define MYPIDFILE "monit.pid" |
|
#define MYSTATEFILE "monit.state" |
|
#define MYIDFILE "monit.id"
|
|
|