aboutsummaryrefslogtreecommitdiffstats
path: root/testing/monit
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2013-06-17 12:29:16 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2013-06-17 12:29:16 +0000
commit1ea3bbe5cbf5f795f712eb5d6333b496891aeb32 (patch)
treeff6ab4a7236777f1ee6399fd4652d0c201e58ba1 /testing/monit
parent2041158f416eb7bc846dbe58a4a67f9b6eab6862 (diff)
downloadaports-1ea3bbe5cbf5f795f712eb5d6333b496891aeb32.tar.bz2
aports-1ea3bbe5cbf5f795f712eb5d6333b496891aeb32.tar.xz
testing/monit: new aport
a utility for monitoring and managing daemons or similar programs running on a Unix system. ref #2024
Diffstat (limited to 'testing/monit')
-rw-r--r--testing/monit/APKBUILD55
-rw-r--r--testing/monit/monit.initd39
2 files changed, 94 insertions, 0 deletions
diff --git a/testing/monit/APKBUILD b/testing/monit/APKBUILD
new file mode 100644
index 0000000000..f51f7c0c7c
--- /dev/null
+++ b/testing/monit/APKBUILD
@@ -0,0 +1,55 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=monit
+pkgver=5.5.1
+pkgrel=0
+pkgdesc="Managing and monitoring on a UNIX system"
+url="http://mmonit.com/monit/"
+arch="all"
+license="AGPL"
+depends=""
+depends_dev="openssl-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://mmonit.com/monit/dist/monit-$pkgver.tar.gz
+ $pkgname.initd"
+
+
+_builddir="$srcdir"/monit-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --without-pam \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ install -Dm 755 "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="16f3809a27fb1d40156e7ad275460645 monit-5.5.1.tar.gz
+c3162a769081f3759e3fae2a672a8a61 monit.initd"
+sha256sums="dbe4b4744a7100e2d5f4eac353dfb2df0549848e2c7661d9c19acc31cdef2c78 monit-5.5.1.tar.gz
+78c013bb1258895a262c670a730e1319ea0f1140bbc3ca2f8dfc85ec02f923a1 monit.initd"
+sha512sums="ca22c7ca15945234470d601f7690dab3d141ecc22362369ec439a74c4cf4d20047bd241dd15466af29ef968ae986b0a4b7f849e0d88657c16dbf9baad4f51db6 monit-5.5.1.tar.gz
+20fb54b251fd97e8014a35940a8cab1ca0de4c1ec3bcc05d2a9091585187759c1ce77cd5f872dde01fa91118d61e9ed3ec0650d09d7e767e78b42c68c1d35b64 monit.initd"
diff --git a/testing/monit/monit.initd b/testing/monit/monit.initd
new file mode 100644
index 0000000000..4163c988b8
--- /dev/null
+++ b/testing/monit/monit.initd
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/app-admin/monit/files/monit.initd-5.0-r1,v 1.2 2011/12/31 16:28:50 idl0r Exp $
+
+extra_commands="configtest"
+extra_started_commands="reload"
+
+depend() {
+ use net
+}
+
+configtest() {
+ /usr/bin/monit -t 1>/dev/null 2>&1
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ eerror "${SVCNAME} has detected an error in your setup:"
+ /usr/bin/monit -t
+ fi
+ return $ret
+}
+
+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 --exec /usr/bin/monit
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading monit"
+ /usr/bin/monit -c /etc/monitrc reload >/dev/null 2>&1
+ eend $?
+}