Skip to content

Commit

Permalink
Merge pull request #1627 from predominant/predominant/monit-2.52.2
Browse files Browse the repository at this point in the history
Update monit to 2.52.2, Extra content for readme, change run hook to …
  • Loading branch information
predominant authored Jul 3, 2018
2 parents 9d051ed + d5d6151 commit b40663d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 11 deletions.
26 changes: 23 additions & 3 deletions monit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,32 @@

This plan packages [monit](https://mmonit.com/monit), a monitoring agent with powers (it can restart processes on failure and so on).

## Maintainers

The Habitat Maintainers: <humans@habitat.sh>

## Type of package

Service package (Intended for wrapping with a configuration plan, see usage notes below).

## Usage

When using monit, you'll want to add your own rules, this cannot be done with this package. You'll need to create your own which would depend on this one. The configuration is provided as a model for you to speed up your package development.

## Plan supporter
```
hab svc load core/monit
```

## Bindings

This package exports the `port` variable that the httpd server is listening on.

Note that this is only able to be connected to from `localhost` by default. You will want to change these restrictions in you *configuration plan* before attempting to bind to this service.

## Topologies

Monit is designed to be run in `standalone` topology.

Romain Sertelon @rsertelon
## Update strategies

Acknowledgement: @jlebloas contributed some changes to the run hook
`at-once` is a good update strategy for this, due to the recommended standalone topology.
2 changes: 1 addition & 1 deletion monit/hooks/run
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!{{pkgPathFor "core/bash"}}/bin/bash
#!/bin/sh

exec 2>&1

Expand Down
19 changes: 12 additions & 7 deletions monit/plan.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
pkg_name=monit
pkg_origin=core
pkg_version="5.25.1"
pkg_version="5.25.2"
pkg_upstream_url="https://mmonit.com/monit"
pkg_description="Monit. Barking at daemons"
pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>"
pkg_license=('AGPL-3.0')
pkg_source="https://mmonit.com/monit/dist/monit-${pkg_version}.tar.gz"
pkg_shasum="4b5c25ceb10825f1e5404f1d8a7b21507716b82bc20c3586f86603691c3b81bc"
pkg_shasum="aa0ce6361d1155e43e30a86dcff00b2003d434f221c360981ced830275abc64a"
pkg_deps=(
core/bash
core/glibc
Expand All @@ -21,11 +21,16 @@ pkg_build_deps=(
pkg_bin_dirs=(bin)
pkg_svc_user=root
pkg_svc_group=root
pkg_exports=(
[port]=httpd.port
)
pkg_exposes=(port)

do_build() {
./configure --prefix="$pkg_prefix" \
--enable-optimized \
--without-pam \
--with-ssl-incl-dir="$(pkg_path_for core/openssl)/include"
make
./configure \
--prefix="${pkg_prefix}" \
--enable-optimized \
--without-pam \
--with-ssl-incl-dir="$(pkg_path_for core/openssl)/include"
make
}

0 comments on commit b40663d

Please sign in to comment.