summaryrefslogtreecommitdiff
path: root/net/nagios-base/files/nagios.sh
diff options
context:
space:
mode:
Diffstat (limited to 'net/nagios-base/files/nagios.sh')
-rw-r--r--net/nagios-base/files/nagios.sh12
1 files changed, 10 insertions, 2 deletions
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