summaryrefslogtreecommitdiff
path: root/net/nagios-base
diff options
context:
space:
mode:
authorgdt <gdt@pkgsrc.org>2008-06-09 12:36:15 +0000
committergdt <gdt@pkgsrc.org>2008-06-09 12:36:15 +0000
commit4a87a3ff3c5aab1672b13b29a6b263ca6891834c (patch)
tree33da890d529aa23b9209162ed43c995695f6ee00 /net/nagios-base
parentd28525e9d67bc333232203ce035815c1e552d6c6 (diff)
downloadpkgsrc-4a87a3ff3c5aab1672b13b29a6b263ca6891834c.tar.gz
In rc.d script, mkdir and chown /var/run/nagios so that nagios can
write the pid file. PKGREVISION++. OK tonnerre@.
Diffstat (limited to 'net/nagios-base')
-rw-r--r--net/nagios-base/Makefile4
-rw-r--r--net/nagios-base/files/nagios.sh12
2 files changed, 12 insertions, 4 deletions
diff --git a/net/nagios-base/Makefile b/net/nagios-base/Makefile
index 023a89dad5c..cc856dff460 100644
--- a/net/nagios-base/Makefile
+++ b/net/nagios-base/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.17 2008/03/18 21:53:41 tonnerre Exp $
+# $NetBSD: Makefile,v 1.18 2008/06/09 12:36:15 gdt Exp $
#
DISTNAME= nagios-2.5
PKGNAME= ${DISTNAME:S/-/-base-/}
-PKGREVISION= 5
+PKGREVISION= 6
CATEGORIES= net sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=nagios/}
diff --git a/net/nagios-base/files/nagios.sh b/net/nagios-base/files/nagios.sh
index ff79f9aae5b..f0dd4715906 100644
--- a/net/nagios-base/files/nagios.sh
+++ b/net/nagios-base/files/nagios.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: nagios.sh,v 1.4 2007/11/26 22:14:14 seb Exp $
+# $NetBSD: nagios.sh,v 1.5 2008/06/09 12:36:15 gdt Exp $
#
# PROVIDE: nagios
# REQUIRE: DAEMON
@@ -10,14 +10,22 @@
name="nagios"
rcvar=$name
command="@PREFIX@/bin/${name}"
-pidfile="/var/run/${name}.lock"
+piddir="/var/run/${name}"
+pidfile="${piddir}/${name}.lock"
config="@PKG_SYSCONFDIR@/${name}.cfg"
command_args="-d $config"
+start_precmd="nagios_precmd"
test_cmd="nagios_test"
extra_commands="test reload"
+nagios_precmd()
+{
+ mkdir -p ${piddir}
+ chown nagios ${piddir}
+}
+
nagios_test()
{
$command -v $config