Created
March 5, 2010 02:20
-
-
Save Ttech/322386 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
. /etc/rc.conf | |
. /etc/rc.d/functions | |
start() { | |
stat_busy "Starting Monit" | |
/usr/bin/monit &> /dev/null | |
if [ $? -gt 0 ]; then | |
stat_fail | |
else | |
add_daemon monit | |
stat_done | |
fi | |
} | |
stop() { | |
stat_busy "Stopping Monit" | |
/usr/bin/monit quit &> /dev/null | |
if [ $? -gt 0 ]; then | |
stat_fail | |
else | |
rm_daemon monit | |
stat_done | |
fi | |
} | |
case "$1" in | |
start) | |
start | |
;; | |
stop) | |
stop | |
;; | |
restart) | |
$0 stop | |
$0 start | |
;; | |
*) | |
echo "usage: $0 {start|stop|restart}" | |
esac | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We needed a new maintainer... | |
pkgname=monit | |
pkgver=5.1.1 | |
pkgrel=1 | |
pkgdesc="Utility for managing and monitoring, processes, files, directories and devices on a *NIX system" | |
url="http://www.tildeslash.com/monit/" | |
license=('GPL3') | |
arch=('i686' 'x86_64') | |
depends=('bison' 'flex' 'openssl') | |
backup=('etc/monitrc') | |
source=(http://www.tildeslash.com/$pkgname/dist/$pkgname-$pkgver.tar.gz \ | |
monitd) | |
md5sums=('4bbd3845ae1cbab13ec211824e0486dc' | |
'889227c1c9d6d0522a20d5181a563326') | |
build() { | |
cd ${srcdir}/$pkgname-$pkgver | |
./configure --prefix=/usr | |
make || return 1 | |
make DESTDIR=${pkgdir} install | |
install -D -m755 ${srcdir}/monitd ${pkgdir}/etc/rc.d/monitd | |
install -D -m644 monitrc ${pkgdir}/etc/monitrc | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment