|
|
@@ -1,7 +1,7 @@
|
|
|
Index: configure
|
|
|
---- configure.orig 2015-10-22 15:45:22.000000000 +0200
|
|
|
-+++ configure 2015-12-19 15:00:03.068951512 +0100
|
|
|
-@@ -12369,6 +12369,7 @@
|
|
|
+--- configure.orig 2016-03-03 14:53:55.000000000 +0100
|
|
|
++++ configure 2016-03-05 10:39:13.102641192 +0100
|
|
|
+@@ -12348,6 +12348,7 @@
|
|
|
|
|
|
|
|
|
for ac_header in \
|
|
|
@@ -10,10 +10,10 @@ Index: configure
|
|
|
arpa/inet.h \
|
|
|
asm/page.h \
|
|
|
Index: src/file.c
|
|
|
---- src/file.c.orig 2015-10-22 15:44:25.000000000 +0200
|
|
|
-+++ src/file.c 2015-12-19 15:01:25.058899047 +0100
|
|
|
-@@ -105,6 +105,9 @@
|
|
|
-
|
|
|
+--- src/file.c.orig 2016-03-03 14:53:18.000000000 +0100
|
|
|
++++ src/file.c 2016-03-05 10:40:48.393191876 +0100
|
|
|
+@@ -101,6 +101,9 @@
|
|
|
+ Util_monitId(Run.files.id);
|
|
|
/* Set the location of monit's state file */
|
|
|
if (Run.files.state == NULL) {
|
|
|
+ if (!getuid())
|
|
|
@@ -22,14 +22,15 @@ Index: src/file.c
|
|
|
snprintf(buf, STRLEN, "%s/.%s", Run.Env.home, MYSTATEFILE);
|
|
|
Run.files.state = Str_dup(buf);
|
|
|
}
|
|
|
-@@ -144,19 +147,7 @@
|
|
|
+@@ -133,27 +136,11 @@
|
|
|
|
|
|
+ char *file_findControlFile() {
|
|
|
char *rcfile = CALLOC(sizeof(char), STRLEN + 1);
|
|
|
-
|
|
|
- snprintf(rcfile, STRLEN, "%s/.%s", Run.Env.home, MONITRC);
|
|
|
-- if (File_exist(rcfile)) {
|
|
|
-- return rcfile;
|
|
|
-- }
|
|
|
++ snprintf(rcfile, STRLEN, "@l_prefix@/etc/monit/%s", MONITRC);
|
|
|
+ if (File_exist(rcfile)) {
|
|
|
+ return rcfile;
|
|
|
+ }
|
|
|
- snprintf(rcfile, STRLEN, "/etc/%s", MONITRC);
|
|
|
- if (File_exist(rcfile)) {
|
|
|
- return rcfile;
|
|
|
@@ -39,14 +40,22 @@ Index: src/file.c
|
|
|
- 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;
|
|
|
- }
|
|
|
+- if (File_exist(rcfile)) {
|
|
|
+- return rcfile;
|
|
|
+- }
|
|
|
+- if (File_exist(MONITRC)) {
|
|
|
+- snprintf(rcfile, STRLEN, "%s/%s", Run.Env.cwd, MONITRC);
|
|
|
+- return rcfile;
|
|
|
+- }
|
|
|
+- LogError("Cannot find the control file at ~/.%s, /etc/%s, %s/%s, /usr/local/etc/%s or at ./%s \n", MONITRC, MONITRC, SYSCONFDIR, MONITRC, MONITRC, MONITRC);
|
|
|
++ LogError("Cannot find the control file at %s\n", rcfile);
|
|
|
+ exit(1);
|
|
|
+ }
|
|
|
+
|
|
|
Index: src/monit.h
|
|
|
---- src/monit.h.orig 2015-10-22 15:44:25.000000000 +0200
|
|
|
-+++ src/monit.h 2015-12-19 15:00:03.089021590 +0100
|
|
|
-@@ -134,6 +134,7 @@
|
|
|
+--- src/monit.h.orig 2016-03-03 14:53:18.000000000 +0100
|
|
|
++++ src/monit.h 2016-03-05 10:39:13.102641192 +0100
|
|
|
+@@ -138,6 +138,7 @@
|
|
|
|
|
|
#define ARGMAX 64
|
|
|
#define MYPIDDIR PIDDIR
|