pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/nagios-base In rc.d script, mkdir and chown /var/r...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e6ad33b1e65b
branches:  trunk
changeset: 543216:e6ad33b1e65b
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Mon Jun 09 12:36:15 2008 +0000

description:
In rc.d script, mkdir and chown /var/run/nagios so that nagios can
write the pid file.  PKGREVISION++.

OK tonnerre@.

diffstat:

 net/nagios-base/Makefile        |   4 ++--
 net/nagios-base/files/nagios.sh |  12 ++++++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diffs (50 lines):

diff -r b5fd3b8991d3 -r e6ad33b1e65b net/nagios-base/Makefile
--- a/net/nagios-base/Makefile  Mon Jun 09 09:08:34 2008 +0000
+++ b/net/nagios-base/Makefile  Mon Jun 09 12:36:15 2008 +0000
@@ -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 -r b5fd3b8991d3 -r e6ad33b1e65b net/nagios-base/files/nagios.sh
--- a/net/nagios-base/files/nagios.sh   Mon Jun 09 09:08:34 2008 +0000
+++ b/net/nagios-base/files/nagios.sh   Mon Jun 09 12:36:15 2008 +0000
@@ -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



Home | Main Index | Thread Index | Old Index