Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 132609 - app-admin/monit-4.8 version bump and init script change
Summary: app-admin/monit-4.8 version bump and init script change
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: MATSUU Takuto (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-07 12:20 UTC by Vincent Rivellino
Modified: 2006-06-10 06:40 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Rivellino 2006-05-07 12:20:09 UTC
I'd like to see monit 4.8 added to portage, as well as a change to the init script.  I'd like to see the init script use a conf file in /etc/conf.d for the ability to reconfigure the pid file.  I have already implemented this in my portage overlay.  The diff is below.

Perhaps the right way to go is change the init script so that it looks for the pidfile in /etc/monitrc, but I think this is sufficient:

root@sp:/usr/portage# diff -uNr app-admin/monit /home/admins/portage/app-admin/monit
diff -uNr app-admin/monit/Manifest /home/admins/portage/app-admin/monit/Manifest
--- app-admin/monit/Manifest    2005-10-29 18:35:17.000000000 +0000
+++ /home/admins/portage/app-admin/monit/Manifest       2006-05-07 19:15:50.000000000 +0000
@@ -1,3 +1,4 @@
+MD5 d45e559acafffb5b7013d7d257e0d7fa monit-4.8.ebuild 983
 MD5 7329be613052c89747f3366d17001613 monit-4.6.ebuild 1030
 MD5 5bfb6be3579d4a63f88a7f7d6c95df1c monit-4.5.1.ebuild 1024
 MD5 4e5340d4eb6b951a0850fce40346a87f monit-4.4.ebuild 1037
@@ -5,5 +6,8 @@
 MD5 dffd46174e78b327c834fc3e4b1cf848 metadata.xml 160
 MD5 17a6822ddbb13943cb1a40598a2a0bc4 files/digest-monit-4.5.1 63
 MD5 12c8e7df38eb7ec788a1a5d54e144998 files/monit.initd 624
+MD5 2fc862cd42e1d62d28b31793d5c2c3ff files/monit.initd-4.8 515
+MD5 2c0db7ec5120d9386b747003b0581a50 files/monit.confd 102
 MD5 72105e93754ee50e7e8966b9ae66090d files/digest-monit-4.4 61
 MD5 08816ad5d035983a9b8573a708d13082 files/digest-monit-4.6 61
+MD5 a40db2d8c2fcfae28c4dbe1b54782962 files/digest-monit-4.8 61
diff -uNr app-admin/monit/files/digest-monit-4.8 /home/admins/portage/app-admin/monit/files/digest-monit-4.8
--- app-admin/monit/files/digest-monit-4.8      1970-01-01 00:00:00.000000000 +0000
+++ /home/admins/portage/app-admin/monit/files/digest-monit-4.8 2006-05-07 19:04:37.000000000 +0000
@@ -0,0 +1 @@
+MD5 376bd526ee5577a6f0a842216f8ccf25 monit-4.8.tar.gz 558265
diff -uNr app-admin/monit/files/monit.confd /home/admins/portage/app-admin/monit/files/monit.confd
--- app-admin/monit/files/monit.confd   1970-01-01 00:00:00.000000000 +0000
+++ /home/admins/portage/app-admin/monit/files/monit.confd      2006-05-07 18:52:12.000000000 +0000
@@ -0,0 +1,3 @@
+# Path to monit PID file.
+# Must match pid file defined in /etc/monitrc.
+PIDFILE="/var/run/monit.pid"
diff -uNr app-admin/monit/files/monit.initd-4.8 /home/admins/portage/app-admin/monit/files/monit.initd-4.8
--- app-admin/monit/files/monit.initd-4.8       1970-01-01 00:00:00.000000000 +0000
+++ /home/admins/portage/app-admin/monit/files/monit.initd-4.8  2006-05-07 19:00:49.000000000 +0000
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header$
+
+opts="${opts} reload"
+
+depend() {
+       use net
+}
+
+start() {
+       ebegin "Starting monit"
+       start-stop-daemon --start --quiet --exec /usr/bin/monit >/dev/null 2>&1
+       eend $?
+}
+
+stop() {
+       ebegin "Stopping monit"
+       start-stop-daemon --stop --quiet --pidfile $PIDFILE
+       eend $?
+}
+
+reload() {
+       ebegin "Reloading monit"
+       /usr/bin/monit -c /etc/monitrc reload >/dev/null 2>&1
+       eend $?
+}
diff -uNr app-admin/monit/monit-4.8.ebuild /home/admins/portage/app-admin/monit/monit-4.8.ebuild
--- app-admin/monit/monit-4.8.ebuild    1970-01-01 00:00:00.000000000 +0000
+++ /home/admins/portage/app-admin/monit/monit-4.8.ebuild       2006-05-07 19:15:14.000000000 +0000
@@ -0,0 +1,39 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header$
+
+DESCRIPTION="a utility for monitoring and managing daemons or similar programs running on a Unix system."
+HOMEPAGE="http://www.tildeslash.com/monit/"
+SRC_URI="http://www.tildeslash.com/monit/dist/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~ppc ~sparc"
+IUSE="ssl"
+
+RDEPEND="virtual/libc
+       ssl? ( dev-libs/openssl )"
+DEPEND="${RDEPEND}
+       sys-devel/flex
+       sys-devel/bison"
+
+src_compile() {
+       econf `use_with ssl` || die
+       emake || die
+}
+
+src_install() {
+       make DESTDIR="${D}" install || die
+
+       dodoc CHANGES.txt CONTRIBUTORS FAQ.txt README* STATUS UPGRADE.txt
+       dohtml -r doc/*
+
+       insinto /etc; insopts -m700; doins monitrc || die
+       newinitd "${FILESDIR}"/monit.initd-4.8 monit || die
+       newconfd "${FILESDIR}"/monit.confd monit || die
+}
+
+pkg_postinst() {
+       einfo "Sample configurations are available at"
+       einfo "http://www.tildeslash.com/monit/examples.html"
+}
Comment 1 MATSUU Takuto (RETIRED) gentoo-dev 2006-06-10 06:40:34 UTC
4.8.1 in cvs.
removed pidfile from init.d/monit