--- monit-4.10.1.orig/debian/control
+++ monit-4.10.1/debian/control
@@ -0,0 +1,42 @@
+Source: monit
+Section: admin
+Priority: optional
+Maintainer: Stefan Alfredsson <alfs@debian.org>
+Build-Depends: debhelper (>> 3.0.0), byacc, flex, cdbs (>= 0.2.4), libssl-dev, automake1.9, dpatch
+Standards-Version: 3.7.3.0
+
+Package: monit
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: A utility for monitoring and managing daemons or similar programs
+ monit is a utility for monitoring and managing daemons or similar
+ programs running on a Unix system. It will start specified programs
+ if they are not running and restart programs not responding.
+ .
+ monit supports:
+  * Daemon mode - poll programs at a specified interval
+  * Monitoring modes - active, passive or manual
+  * Start, stop and restart of programs
+  * Group and manage groups of programs
+  * Process dependency definition
+  * Logging to syslog or own logfile
+  * Configuration - comprehensive controlfile
+  * Runtime and TCP/IP port checking (tcp and udp)
+  * SSL support for port checking
+  * Unix domain socket checking
+  * Process status and process timeout
+  * Process cpu usage
+  * Process memory usage
+  * Process zombie check
+  * Check the systems load average
+  * Check a file or directory timestamp
+  * Alert, stop or restart a process based on its characteristics
+  * MD5 checksum for programs started and stopped by monit
+  * Alert notification for program timeout, restart, checksum, stop 
+    resource and timestamp error
+  * Flexible and customizable email alert messages
+  * Protocol verification. HTTP, FTP, SMTP, POP, IMAP, NNTP, SSH, DWP, 
+    LDAPv2 and LDAPv3
+  * An http interface with optional SSL support to make monit 
+    accessible from a webbrowser
+
--- monit-4.10.1.orig/debian/rules
+++ monit-4.10.1/debian/rules
@@ -0,0 +1,29 @@
+#!/usr/bin/make -f
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/dpatch.mk
+include /usr/share/cdbs/1/class/autotools.mk
+
+# This variable adds several arguments to the ./configure invocation,
+# in *addition* to what autotools.mk does normally.  So the end command
+# will look something like:
+# ./configure --prefix=/usr/ --sysconfdir=/etc ... --options-below...
+DEB_AUTO_UPDATE_AUTOMAKE := 1.9
+DEB_AUTO_UPDATE_AUTOCONF := pre
+DEB_CONFIGURE_EXTRA_FLAGS := --bindir=/usr/sbin --without-accurate-mem-calcs
+
+# Install examples
+#DEB_INSTALL_EXAMPLES_monit := debian/example.monitrc 
+
+# update-rc.d init script args
+DEB_DH_INSTALLINIT_ARGS := -- start 99 2 3 4 5 . stop 10 0 1 6 .
+
+DEB_INSTALL_CHANGELOGS_ALL := CHANGES.txt
+
+# Matching files will not have their perms changed
+DEB_FIXPERMS_EXCLUDE := monitrc
+
+binary-post-install/monit::
+	install -o root -g root -m0600 monitrc debian/monit/etc/monit
+
+clean::
+	rm -f debian/monit/etc/monit/monitrc
--- monit-4.10.1.orig/debian/compat
+++ monit-4.10.1/debian/compat
@@ -0,0 +1 @@
+4
--- monit-4.10.1.orig/debian/changelog
+++ monit-4.10.1/debian/changelog
@@ -0,0 +1,294 @@
+monit (1:4.10.1-4~bpo40+1) etch-backports; urgency=low
+
+  * Rebuild for etch.
+
+ -- Norbert Tretkowski <nobse@debian.org>  Fri, 23 Jan 2009 13:00:29 +0100
+
+monit (1:4.10.1-4) unstable; urgency=low
+
+  * Patch for config file location was not applied (Closes: #479357)
+    (thanks to DVZ-Team <dv-zentrum@fh-giessen.de>)
+  * The relocation patch created an unneccessary "file.c.orig", this
+    was removed from the patch.
+
+ -- Stefan Alfredsson <alfs@debian.org>  Sun, 24 Aug 2008 23:44:46 +0000
+
+monit (1:4.10.1-3) unstable; urgency=low
+
+  * SSL enabled as upstream provided GPL/OpenSSL
+    license exception (Closes: #466821)
+
+ -- Stefan Alfredsson <alfs@debian.org>  Fri, 22 Feb 2008 07:25:01 +0100
+
+monit (1:4.10.1-2) unstable; urgency=low
+
+  * Added build-dependency on dpatch (Closes: #463469)
+
+ -- Stefan Alfredsson <alfs@debian.org>  Thu, 31 Jan 2008 22:22:59 +0100
+
+monit (1:4.10.1-1) unstable; urgency=low
+
+  * New upstream release (Closes: #453248)
+  * Upstream has fixed pid testing since v4.8 (Closes: #364844)
+  * Event queue segfault problem patched by upstream (Closes: #399027)
+  * HTTP segfault patched by upstream (Closes: #433164)
+  * Added LSB formatted dependency to init-script (Closes: #460299)
+  * Removed bashism echo -e in init-script (Closes: #411886)
+
+ -- Stefan Alfredsson <alfs@debian.org>  Tue, 29 Jan 2008 21:36:33 +0100
+
+monit (1:4.9-1) unstable; urgency=low
+
+  * New upstream release
+  * Updated init-script to use printf instead of echo -e (Closes: #411886)
+  * Removed LFS patch because its integrated by upstream
+
+ -- Stefan Alfredsson <alfs@debian.org>  Wed, 25 Jul 2007 00:05:35 +0200
+
+monit (1:4.8.1-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * monit-lfs.patch: Add LFS support; patch adapted from upstream CVS by
+    Michael Mende. (Closes: #395164)
+  * Build-depend on automake and set some magical cdbs option to enable
+    re-automaking, as monit-lfs.patch touches configure.ac.
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Mon, 13 Nov 2006 13:38:47 +0100
+
+monit (1:4.8.1-2) unstable; urgency=low
+
+  * Wait for daemon to stop before restart (Closes: #368700)
+
+ -- Stefan Alfredsson <alfs@debian.org>  Wed, 24 May 2006 14:47:01 +0200
+
+monit (1:4.8.1-1) unstable; urgency=low
+
+  * New upstream release
+  * AMD64 bugfix integrated in upstream (Closes: #367341) -- however
+    there may be additional issues with starting scripts. Please open
+    a new bug if this is the case.
+
+ -- Stefan Alfredsson <alfs@debian.org>  Wed, 17 May 2006 23:50:46 +0200
+
+monit (1:4.8-2) unstable; urgency=low
+
+  * Applied patch for AMD64 bug (hopefully solving Bug#367341)
+
+ -- Stefan Alfredsson <alfs@debian.org>  Tue, 16 May 2006 07:04:58 +0200
+
+monit (1:4.8-1) unstable; urgency=low
+
+  * New upstream release (Closes: #366860)
+  * Priority logging implemented by upstream (Closes: #353758)
+
+ -- Stefan Alfredsson <alfs@debian.org>  Fri, 12 May 2006 07:30:58 +0200
+
+monit (1:4.7-1) unstable; urgency=low
+
+  * New upstream release
+  * Applied NTP leap indicator patch (Closes: #352065) - should be
+    removed for next upstream release as they've embraced it.
+
+ -- Stefan Alfredsson <alfs@debian.org>  Mon, 27 Feb 2006 23:35:16 +0100
+
+monit (1:4.6-1) unstable; urgency=low
+
+  * New upstream release (Closes: #306259, #308369, #315638)
+
+ -- Stefan Alfredsson <alfs@debian.org>  Fri, 11 Nov 2005 21:04:32 +0100
+
+monit (1:4.5-1) unstable; urgency=low
+
+  * New upstream release (Closes: #303100)
+  * File 'files.c' renamed, causing a patch to fail. Patch patched to
+    use the new name 'file.c'
+
+ -- Stefan Alfredsson <alfs@debian.org>  Tue,  5 Apr 2005 16:38:16 +0200
+
+monit (1:4.4-4) unstable; urgency=low
+
+  * Updated to new standards-version
+
+ -- Stefan Alfredsson <alfs@debian.org>  Sun, 27 Mar 2005 23:30:01 +0200
+
+monit (1:4.4-3) unstable; urgency=low
+
+  * Handles race condition for slow-to-start processes, see README.Debian
+    (Contributed by David Greaves <david@dgreaves.com>)
+
+ -- Stefan Alfredsson <alfs@debian.org>  Mon, 14 Mar 2005 18:24:22 +0100
+
+monit (1:4.4-2) unstable; urgency=low
+
+  * Moved from priority extra to optional 
+  * Removed coreutils dependency since its part of base and required (and is
+    thus installed).
+  * Removed stat dependency alltogether, sets correct perms instead
+  * init-script now references $CONFIG instead of /etc/monit/monitrc in
+    various places.
+  * Now configures with --without-accurate-mem-calcs (Closes: #298045)
+
+ -- Stefan Alfredsson <alfs@debian.org>  Tue,  1 Mar 2005 12:23:36 +0100
+
+monit (1:4.4-1) unstable; urgency=low
+
+  * New maintainer (Stefan Alfredsson, adoption agreed on IRC channel #kuf)
+  * New upstream release
+  * AMD64 compiles are fixed by upstream (please verify) (Closes: #287659)
+  * Added dependency on 'coreutils' because of stat-usage (Closes: #247226)
+  * Syntax checking from initscript, thanks to admin@cs.montana.edu
+    (Closes: #258148)
+  * Fixed spelling (Closes: #268530, #277252)
+  * buildd logs indicate good arm/ppc/s390 builds (Closes: #169439)
+
+ -- Stefan Alfredsson <alfs@debian.org>  Mon, 28 Feb 2005 12:26:38 +0100
+
+monit (1:4.2.1-2) unstable; urgency=low
+
+  * Changed defunct location of state file to /var/lib/monit (Closes:#231140)
+  * Removed old example monitrc
+  * Added examples from upstream
+  * Added README.SSL
+  * Added UPGRADE.txt
+  * Added doc/monit.html manual
+  * Changed /etc/monitrc references to /etc/monit/monitrc (Closes:#244646)
+
+ -- Fredrik Steen <stone@debian.org>  Tue, 10 Aug 2004 12:39:29 +0200
+
+monit (1:4.2.1-1) unstable; urgency=high
+
+  * New upstream release with security fix (Closes:#242515)
+
+ -- Fredrik Steen <stone@debian.org>  Tue, 13 Apr 2004 15:34:54 +0200
+
+monit (1:4.1.1-1) unstable; urgency=low
+
+  * New upstream release Closes:#222303
+  * Security update: There exists security vulnerabilites in the 4.0 version
+    of monit HTTP interface. This release fixes this.
+  * Some changes to init.d script to not exit with 1 when permissions
+    on monitrc is wrong. (breaks when removing the package)
+  * Fixed installation permissions on configuration file. Closes:#173348
+  * Added CHECK_INTERVAL configurable variable to /etc/default/monit
+  * This upload makes it easier to backport to woody because of change
+    of "stat" syntax. Closes:#198130
+
+ -- Fredrik Steen <stone@debian.org>  Wed, 26 Nov 2003 13:12:08 +0100
+
+monit (1:4.0-2) experimental; urgency=low
+
+  * Updated monit package to use cdbs 
+
+ -- Fredrik Steen <stone@debian.org>  Tue, 21 Oct 2003 13:34:31 +0200
+
+monit (1:4.0-1) experimental; urgency=low
+
+  * New upstream release
+  * Patched original source for new location of monitrc (in
+    /etc/monit/monitrc)
+  * Added stat line in init.d script making it easier for backports of monit
+    to woody. (Closes:#198130)
+  * Now compiled with SSL-support (LICENSE now permits linking with OpenSSL)
+  * The startup is now denied via /etc/default/monit configuration. 
+
+ -- Fredrik Steen <stone@debian.org>  Wed, 24 Sep 2003 15:46:31 +0200
+
+monit (1:3.2-1) unstable; urgency=low
+
+  * New upstream release 
+  * Now changing permission on configfile when installing/configuring
+   - (Closes:#173348)
+  * This relase has a new license which grant linking with OpenSSL.
+    - Message-ID: <m2znmhrzzk.fsf@tildeslash.com>
+
+ -- Fredrik Steen <stone@debian.org>  Tue, 22 Apr 2003 10:14:19 +0200
+
+monit (1:3.1-1) unstable; urgency=low
+
+  * New upstream release
+  * Disabled beta SSL support. (Need to check the legal stuff)
+
+ -- Fredrik Steen <stone@debian.org>  Wed, 15 Jan 2003 10:26:12 +0100
+
+monit (1:3.0-2) unstable; urgency=low
+
+  * Check implemented in /etc/init.d/monit for checking permissions
+    on configfile /etc/monit/monitrc, Upstream will probably make all
+    error messages go to syslog and this is not needed anymore.
+    Unfortunately the startup messages of monit is too chatty
+    until that is fixed upstream the need to redirect stderr,stdout
+    to devnull from init-script is still needed. (Closes:#173348) 
+  * /etc/init.d/monit is now a conffile.
+  * No need for conffiles file when using debhelper 3 or greater.
+
+ -- Fredrik Steen <stone@debian.org>  Tue, 17 Dec 2002 13:09:02 +0100
+
+monit (1:3.0-1) unstable; urgency=low
+
+  * New upstream release (Closes:#166058)
+  * Changed permission on configfile /etc/monit/monitrc
+
+ -- Fredrik Steen <stone@debian.org>  Tue, 29 Oct 2002 16:09:44 +0100
+
+monit (1:2.5.1-3) unstable; urgency=low
+
+  * Fixes the old bug wich made monit start/stop to 
+    early/late (#158388)
+
+ -- Fredrik Steen <stone@debian.org>  Wed, 16 Oct 2002 12:14:21 +0200
+
+monit (1:2.5.1-2) unstable; urgency=low
+
+  * Fixed dumb package bug changed clean target config to do a
+    distclean instead of clean Closes:#159295
+  * Changed example monitrc
+
+ -- Fredrik Steen <stone@debian.org>  Mon,  2 Sep 2002 15:51:05 +0200
+
+monit (1:2.5.1-1) unstable; urgency=low
+
+  * New upstram release
+  * Upstream now do correct rfc 821 envelopes Closes:#153520  
+  * Controlfiles updated so monit will start late and stop early in the
+    init-process Closes:#158388, thanks to Mark Ferlatte.
+  * Updated Standards-Version.
+  * Fixed the "restart" target in monit init.d script.
+
+ -- Fredrik Steen <stone@debian.org>  Tue, 27 Aug 2002 18:59:23 +0200
+
+monit (2.5-2) unstable; urgency=low
+
+  * Spelling error in init-script fixed.
+
+ -- Fredrik Steen <stone@debian.org>  Fri, 16 Aug 2002 15:05:40 +0200
+
+monit (2.5-1) unstable; urgency=low
+
+  * New upstream release
+  * TODO removed from upstream
+  * Spelling
+
+ -- Fredrik Steen <stone@debian.org>  Thu, 18 Jul 2002 18:05:15 +0200
+
+monit (2.4-1) unstable; urgency=low
+
+  * New upstream release
+  * FAQ changed to FAQ.txt upstream
+  * Upload to Debian Closes:#147642
+
+ -- Fredrik Steen <stone@debian.org>  Wed, 29 May 2002 09:04:50 +0200
+
+monit (2.3-2) unstable; urgency=low
+
+  * fixed /etc/init.d/monit
+  * Added example monitrc
+  * Addedd missing build-dep on flex and byacc
+
+ -- Fredrik Steen <stone@debian.org>  Tue, 21 May 2002 13:48:18 +0200
+
+monit (2.3-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Fredrik Steen <stone@debian.org>  Tue, 21 May 2002 09:52:55 +0200
+
--- monit-4.10.1.orig/debian/example.monitrc
+++ monit-4.10.1/debian/example.monitrc
@@ -0,0 +1,20 @@
+# Example config for ssh
+check sshd with pidfile /var/run/sshd.pid
+        start = "/etc/init.d/ssh start"
+        stop = "/etc/init.d/ssh stop"
+        timeout(3, 3) and alert you@yourdomain.com
+        checksum /usr/sbin/sshd
+        and expect the sum a68ece0b46d2f42b655d0bf6434c317a
+
+# Example config for mysql
+check mysql with pidfile /var/run/mysqld/mysqld.pid
+        start program = "/etc/init.d/mysql start"
+        stop program = "/etc/init.d/mysql start"
+        port 3306
+        checksum start and stop
+        checksum /usr/sbin/mysqld
+        and expect the sum c020c32536b9d06a74ded321093853ff
+        alert you@yourdomain.com
+        autostart yes
+        group server
+        timeout if 2 restarts within 3 cycles
--- monit-4.10.1.orig/debian/monit.dirs
+++ monit-4.10.1/debian/monit.dirs
@@ -0,0 +1,3 @@
+etc/default
+etc/monit
+var/lib/monit
--- monit-4.10.1.orig/debian/watch
+++ monit-4.10.1/debian/watch
@@ -0,0 +1,5 @@
+# Example watch control file for uscan
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+# Site		Directory		Pattern			Version	Scrip
+http://www.tildeslash.com	/monit/dist/	monit-(.*)\.tar\.gz	debian	uupdate
--- monit-4.10.1.orig/debian/monit.init
+++ monit-4.10.1/debian/monit.init
@@ -0,0 +1,124 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          monit
+# Required-Start:    $remote_fs
+# Required-Stop:     $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: service and resource monitoring daemon
+### END INIT INFO
+# /etc/init.d/monit start and stop monit daemon monitor process.
+# Fredrik Steen, stone@debian.org
+# Stefan Alfredsson, alfs@debian.org
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/monit
+CONFIG="/etc/monit/monitrc"
+DELAY="/etc/monit/monit_delay"
+CHECK_INTERVALS=180
+# We default to 180s (3min) check intervals
+NAME=monit
+DESC="daemon monitor"
+
+set -e
+
+# Check if DAEMON binary exist
+test -f $DAEMON || exit 0
+
+if [ -f "/etc/default/monit" ]; then
+     . /etc/default/monit
+fi
+
+ARGS="-d $CHECK_INTERVALS -c $CONFIG -s /var/lib/monit/monit.state"
+
+monit_not_configured () {
+    printf "%b\n" "monit won't be started/stopped\n\tunless it it's configured"
+    if [ "$1" != "stop" ]
+        then
+        printf "%b\n" "\tplease configure monit and then edit /etc/default/monit"
+        printf "%b\n" "\tand set the \"startup\" variable to 1 in order to allow "
+        printf "%b\n" "\tmonit to start"
+    fi
+    exit 0
+}
+
+monit_check_config () {
+    # Check for emtpy config, probably default configfile.
+    if [ "`grep -s -v \"^#\" $CONFIG`" = "" ]; then
+        echo "empty config, please edit $CONFIG."
+        exit 0
+    fi
+}
+
+monit_check_perms () {
+    # Check the permission on configfile. 
+    # The permission must not have more than -rwx------ (0700) permissions.
+   
+    # Skip checking, fix perms instead.
+    /bin/chmod go-rwx $CONFIG
+
+}
+
+monit_delayed_monitoring () {
+    if [ -x $DELAY ]; then
+      $DELAY &
+    elif [ -f $DELAY ]; then
+      echo
+      echo "[WARNING] A delayed start file exists ($DELAY) but it is not executable."
+    fi
+}
+
+monit_check_syntax () {
+  $DAEMON -t;
+#  if [ $? ] ; then
+#      echo "syntax good"
+#  else
+#      echo "syntax bad"
+#  fi
+}
+
+
+monit_checks () {
+    # Check if startup variable is set to 1, if not we exit.
+    if [ "$startup" != "1" ]; then
+        monit_not_configured $1
+    fi
+    # Check for emtpy configfile
+    monit_check_config
+    # Check permissions of configfile
+    monit_check_perms
+}
+
+case "$1" in
+  start)
+	echo -n "Starting $DESC: "
+    monit_checks $1
+	echo -n "$NAME"
+	start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
+		--exec $DAEMON > /dev/null 2>&1 -- $ARGS
+   monit_delayed_monitoring
+	echo "."
+	;;
+  stop)
+	echo -n "Stopping $DESC: "
+    #monit_checks $1
+	echo -n "$NAME"
+	start-stop-daemon --retry 5 --oknodo --stop --quiet --pidfile /var/run/$NAME.pid \
+		--exec $DAEMON  > /dev/null 2>&1
+	echo "."
+	;;
+  restart|force-reload)
+	$0 stop
+	$0 start
+	;;
+  syntax)
+   monit_check_syntax
+   ;;
+  *)
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|restart|force-reload|syntax}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
--- monit-4.10.1.orig/debian/copyright
+++ monit-4.10.1/debian/copyright
@@ -0,0 +1,47 @@
+This package was debianized by Fredrik Steen <stone@debian.org> on
+Tue, 21 May 2002 09:52:55 +0200.
+
+It was downloaded from http://www.tildeslash.com/monit/dist/
+
+Upstream Author: Jan-Henrik Haukeland <hauk@tildeslash.com>
+
+Copyright:
+
+   This package is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; version 2 dated June, 1991.
+
+   This package is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License along
+   with this program; if not, write to the Free Software Foundation, Inc.,
+   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
+
+
+On Tue Feb 19 11:50:18 2008 UTC (2 days, 1 hour ago) by hauk,
+the following license exception was given:
+
+http://cvs.savannah.gnu.org/viewvc/monit/monit/COPYING?revision=1.3&view=markup
+
+                        License Exception
+
+In addition, as a special exception, the copyright holders give
+permission to link the code of portions of this program with the
+OpenSSL library under certain conditions as described in each
+individual source file, and distribute linked combinations
+including the two.
+
+You must obey the GNU General Public License in all respects
+for all of the code used other than OpenSSL. If you modify
+file(s) with this exception, you may extend this exception to your
+version of the file(s), but you are not obligated to do so. If you
+do not wish to do so, delete this exception statement from your
+version. If you delete this exception statement from all source
+files in the program, then also delete it here.
--- monit-4.10.1.orig/debian/monit.default
+++ monit-4.10.1/debian/monit.default
@@ -0,0 +1,11 @@
+# Defaults for monit initscript
+# sourced by /etc/init.d/monit
+# installed at /etc/default/monit by maintainer scripts
+# Fredrik Steen <stone@debian.org>
+
+# You must set this variable to for monit to start
+startup=0
+
+# To change the intervals which monit should run uncomment
+# and change this variable.
+# CHECK_INTERVALS=180
--- monit-4.10.1.orig/debian/monit.docs
+++ monit-4.10.1/debian/monit.docs
@@ -0,0 +1,6 @@
+FAQ.txt
+README
+README.SSL
+UPGRADE.txt
+doc/monit.html
+debian/README.Debian
--- monit-4.10.1.orig/debian/README.Debian
+++ monit-4.10.1/debian/README.Debian
@@ -0,0 +1,23 @@
+
+For some slow-to-start processes monit can, especially at bootup, start 
+to monitor a process before it is fully initialised.
+This can cause monit to erroneously attempt a restart.
+To avoid this, you should have the process set to 'mode manual' in 
+monitrc and then create a script called monit_delay in /etc/monit/
+
+A typical /etc/monit/monit_delay looks like this:
+
+-------------------------------------------
+#!/bin/sh
+
+monit unmonitor slow_startup_process
+sleep 30
+monit monitor slow_startup_process
+-------------------------------------------
+
+Do not forget to set the executable flag on this file,
+chmod +x /etc/monit/monit_delay
+
+Note that you can just monitor the key process and any dependencies will 
+also be monitored.
+
--- monit-4.10.1.orig/debian/patches/00list
+++ monit-4.10.1/debian/patches/00list
@@ -0,0 +1,2 @@
+config_file_relocation
+monit.1-debian-path
--- monit-4.10.1.orig/debian/patches/config_file_relocation.dpatch
+++ monit-4.10.1/debian/patches/config_file_relocation.dpatch
@@ -0,0 +1,33 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## config_file_relocation.dpatch by  <alfs@kossan>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad monit-4.10.1/file.c /tmp/dpep.zWsLpf/monit-4.10.1/file.c
+--- monit-4.10.1/file.c	Sun Aug 12 20:02:48 2007
++++ /tmp/dpep.zWsLpf/monit-4.10.1/file.c	Tue Jan 29 21:43:29 2008
+@@ -158,6 +158,11 @@
+     return (rcfile);
+   }
+   memset(rcfile, 0, STRLEN);
++  snprintf(rcfile, STRLEN, "/etc/monit/%s", MONITRC);
++  if(File_exist(rcfile)) {
++    return (rcfile);
++  }
++  memset(rcfile, 0, STRLEN);
+   snprintf(rcfile, STRLEN, "/etc/%s", MONITRC);
+   if(File_exist(rcfile)) {
+     return (rcfile);
+@@ -178,8 +183,8 @@
+     return (rcfile);
+   }
+   LogError("%s: Cannot find the control file at "
+-      "~/.%s, /etc/%s, %s/%s, /usr/local/etc/%s or at ./%s \n",
+-      prog, MONITRC, MONITRC, SYSCONFDIR, MONITRC, MONITRC, MONITRC);
++       "~/.%s, /etc/monit/%s, /etc/%s, /usr/local/etc/%s or at ./%s \n",
++       prog, MONITRC, MONITRC, MONITRC, MONITRC, MONITRC);
+   exit(1);
+   
+ }
--- monit-4.10.1.orig/debian/patches/monit.1-debian-path.dpatch
+++ monit-4.10.1/debian/patches/monit.1-debian-path.dpatch
@@ -0,0 +1,87 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## monit.1-debian-path.dpatch by  <alfs@kossan>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad monit-4.10.1/monit.1 /tmp/dpep.xKk4QA/monit-4.10.1/monit.1
+--- monit-4.10.1/monit.1	Tue Nov  6 21:34:52 2007
++++ /tmp/dpep.xKk4QA/monit-4.10.1/monit.1	Tue Jan 29 21:50:52 2008
+@@ -307,8 +307,8 @@
+ .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, then
+-@sysconfdir@/monitrc and finally ./monitrc.
++this file does not exist, monit will try /etc/monit/monitrc, then
++/etc/monitrc, then @sysconfdir@/monitrc and finally ./monitrc.
+ .PP
+ A monit control file consists of a series of service entries and
+ global option statements in a free\-format, token-oriented syntax.
+@@ -465,7 +465,7 @@
+ .PP
+ .Vb 2
+ \&  # Run monit in standard run\-levels
+-\&  mo:2345:respawn:/usr/local/bin/monit \-Ic /etc/monitrc
++\&  mo:2345:respawn:/usr/sbin/monit \-Ic /etc/monit/monitrc
+ .Ve
+ .PP
+ After you have modified init's configuration file, you can run
+@@ -1749,7 +1749,7 @@
+ script. Example:
+ .PP
+ .Vb 3
+-\& check file monit.bin with path "/usr/local/bin/monit"
++\& check file monit.bin with path "/usr/sbin/monit"
+ \&       if failed permission 0555 then unmonitor
+ \&       alert foo@bar
+ .Ve
+@@ -3600,7 +3600,7 @@
+ .IX Item "4. monit starts the node group"
+ .PD
+ .PP
+-\&\fBMonit: \f(BI/etc/monitrc\fB\fR
++\&\fBMonit: \f(BI/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
+@@ -3691,7 +3691,7 @@
+ .PP
+ .Vb 2
+ \& #/etc/inittab
+-\& mo:2345:respawn:/usr/local/bin/monit \-d 10 \-c /etc/monitrc \-g local
++\& mo:2345:respawn:/usr/sbin/monit \-d 10 \-c /etc/monit/monitrc \-g local
+ .Ve
+ .PP
+ \&\fBheartbeat:  \f(BI/etc/ha.d/haresources\fB\fR
+@@ -3714,7 +3714,7 @@
+ \& #
+ \& # sample script for starting/stopping all services on node1
+ \& #
+-\& prog="/usr/local/bin/monit \-g node1"
++\& prog="/usr/sbin/monit \-g node1"
+ \& start()
+ \& {
+ \&       echo \-n $"Starting $prog:"
+@@ -3767,9 +3767,9 @@
+ \&\fI~/.monitrc\fR  
+    Default run control file
+ .PP
+-\&\fI/etc/monitrc\fR
++\&\fI/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 /etc/monit contains a \fImonitrc\fR file, this
+    file will be used instead.
+ .PP
+ \&\fI./monitrc\fR  
+@@ -3875,6 +3875,8 @@
+ Rory Toma <rory@digeo.com>
+ .PP
+ See also http://www.tildeslash.com/monit/who.html
++.PP
++Edited by Stefan Alfredsson <alfs@debian.org> for the Debian project.
+ .SH "COPYRIGHT"
+ .IX Header "COPYRIGHT"
+ Copyright (C) 2000\-2007 by the monit project group. All Rights
