add an rc script for nagios; ok ajacoutot@

This commit is contained in:
sthen 2011-01-20 14:04:33 +00:00
parent 6e676f1b3f
commit 6d0528957b
4 changed files with 18 additions and 13 deletions

View File

@ -1,9 +1,10 @@
# $OpenBSD: Makefile,v 1.43 2010/11/19 22:31:35 espie Exp $
# $OpenBSD: Makefile,v 1.44 2011/01/20 14:04:33 sthen Exp $
COMMENT-main= host and service monitor
COMMENT-web= cgis and webpages for nagios
V= 3.2.3
REVISION-main= 0
DISTNAME= nagios-${V}
PKGNAME-main= nagios-${V}
PKGNAME-web= nagios-web-${V}

View File

@ -1,11 +0,0 @@
Sample configuration files and web server configuration can be found in
${PREFIX}/share/examples/nagios.
Beware that Nagios might or might not work correctly on 64bit machines.
To start nagios automatically, add these lines to /etc/rc.local
if [ -x ${PREFIX}/sbin/nagios ]; then
install -d -o _nagios /var/run/nagios
echo -n ' nagios'; ${PREFIX}/sbin/nagios -d ${SYSCONFDIR}/nagios/nagios.cfg
fi

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-main,v 1.8 2010/10/23 13:12:57 sthen Exp $
@comment $OpenBSD: PLIST-main,v 1.9 2011/01/20 14:04:33 sthen Exp $
@pkgpath ${BASE_PKGPATH}
@newgroup _nagios:550
@newuser _nagios:550:_nagios:daemon:Nagios user:/var/www/nagios:/sbin/nologin
@ -53,3 +53,4 @@ share/examples/nagios/resource.cfg
@extra ${CHROOT}/var/nagios/retention.dat
@extra ${CHROOT}/var/nagios/status.dat
@extra ${CHROOT}/var/nagios/rw/nagios.cmd
@rcscript ${RCDIR}/nagios

View File

@ -0,0 +1,14 @@
#!/bin/sh
#
# $OpenBSD: nagios.rc,v 1.1 2011/01/20 14:04:33 sthen Exp $
daemon="${TRUEPREFIX}/sbin/nagios"
daemon_flags="-d ${SYSCONFDIR}/nagios/nagios.cfg"
. /etc/rc.d/rc.subr
rc_pre() {
install -d -o _nagios /var/run/nagios
}
rc_cmd $1