[-]
[+]
|
Changed |
monit.spec
|
|
[-]
[+]
|
Added |
monit-default-config-name.patch
^
|
@@ -0,0 +1,11 @@
+--- monitor.h.renamed_config 2008-12-07 01:15:10.000000000 +0100
++++ monitor.h 2008-12-07 01:15:19.000000000 +0100
+@@ -71,7 +71,7 @@
+
+
+ #define VERSION PACKAGE_VERSION
+-#define MONITRC "monitrc"
++#define MONITRC "monit.conf"
+ #define TIMEFORMAT "%Z %b %e %T"
+ #define STRERROR strerror(errno)
+ #define STRLEN 256
|
[-]
[+]
|
Added |
monit-no-startup-msg.patch
^
|
@@ -0,0 +1,13 @@
+--- monitor.c.nomsg 2010-07-05 19:16:34.337850714 +0200
++++ monitor.c 2010-07-05 19:17:19.821070156 +0200
+@@ -482,10 +482,6 @@ static void do_default() {
+ exit(0);
+
+ Run.once = FALSE;
+- if (can_http())
+- LogInfo("Starting %s daemon with http interface at [%s:%d]\n", prog, Run.bind_addr?Run.bind_addr:"*", Run.httpdport);
+- else
+- LogInfo("Starting %s daemon\n", prog);
+
+ if (Run.startdelay)
+ LogInfo("Monit start delay set -- pause for %ds\n", Run.startdelay);
|
[-]
[+]
|
Added |
create_monit_ssl.sh
^
|
@@ -0,0 +1,10 @@
+#!/bin/bash
+openssl genrsa \
+-out /etc/monit_ssl_key.pem 1024
+openssl req -batch -new \
+-key /etc/monit_ssl_key.pem \
+-out /etc/monit_ssl_cert.csr
+openssl x509 -req -days 999 \
+-in /etc/monit_ssl_cert.csr \
+-signkey /etc/monit_ssl_key.pem \
+-out /etc/monit_ssl_cert.pem
|
[-]
[+]
|
Added |
monit-logging-conf
^
|
@@ -0,0 +1,3 @@
+# log to monit.log
+set logfile /var/log/monit.log
+
|
[-]
[+]
|
Added |
monit-sysv-initscript
^
|
@@ -0,0 +1,86 @@
+#!/bin/bash
+#
+# Init file for Monit system monitor
+# Written by Stewart Adam <s.adam@diffingo.com>
+# based on script by Dag Wieers <dag@wieers.com>.
+#
+# chkconfig: - 98 02
+# description: Utility for monitoring services on a Unix system
+#
+# processname: monit
+# config: /etc/monit.conf
+# pidfile: /var/run/monit.pid
+# Short-Description: Monit is a system monitor
+
+# Source function library.
+. /etc/init.d/functions
+
+### Default variables
+CONFIG="/etc/monit.conf"
+pidfile="/var/run/monit.pid"
+prog="monit"
+
+# Check if requirements are met
+[ -x /usr/bin/monit ] || exit 1
+[ -r "$CONFIG" ] || exit 1
+
+RETVAL=0
+
+start() {
+ echo -n $"Starting $prog: "
+ daemon $prog
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
+ return $RETVAL
+}
+
+stop() {
+ echo -n $"Shutting down $prog: "
+ killproc -p ${pidfile}
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
+ return $RETVAL
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ echo -n $"Reloading $prog: "
+ monit -c "$CONFIG" reload
+ RETVAL=$?
+ echo
+ return $RETVAL
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ restart
+ ;;
+ reload)
+ reload
+ ;;
+ condrestart)
+ [ -e /var/lock/subsys/$prog ] && restart
+ RETVAL=$?
+ ;;
+ status)
+ status $prog
+ RETVAL=$?
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
+ RETVAL=1
+esac
+
+exit $RETVAL
|
[-]
[+]
|
Added |
monit.logrotate
^
|
@@ -0,0 +1,9 @@
+/var/log/monit.log {
+ missingok
+ notifempty
+ size 100k
+ create 0644 root root
+ postrotate
+ /bin/systemctl reload monit.service > /dev/null 2>&1 || :
+ endscript
+}
|