summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorBoris Samorodov <bsam@FreeBSD.org>2006-10-02 19:35:42 +0000
committerBoris Samorodov <bsam@FreeBSD.org>2006-10-02 19:35:42 +0000
commitf5296d7d162e2033f6e757ae449c5086de5ede78 (patch)
tree7af2d32a1a0b6f930c93bfa715f084b150fd6127 /sysutils
parentRun ttmkfdir in a writable directory and unbreak. (diff)
- fix startup for rc.subr; [1]
- update to 3.12; [1] - remove etc/rc.d/nagiosstatd from pkg-plist as USE_RC_SUBR deals itself with those files; - remove etc/rc.d/nagios-statd.sh.sample from pkg-plist (forgotten by the submitter). PR: 103913 [1] Submitted by: Jim Shewmaker <jims at bluenotch.com> (maintainer) [1]
Notes
Notes: svn path=/head/; revision=174332
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/nagios-statd/Makefile4
-rw-r--r--sysutils/nagios-statd/distinfo6
-rw-r--r--sysutils/nagios-statd/files/nagios-statd.sh.sample21
-rw-r--r--sysutils/nagios-statd/files/nagiosstatd.sh.in35
-rw-r--r--sysutils/nagios-statd/pkg-plist1
5 files changed, 40 insertions, 27 deletions
diff --git a/sysutils/nagios-statd/Makefile b/sysutils/nagios-statd/Makefile
index 507e716519fb..e6db8ff5d8cd 100644
--- a/sysutils/nagios-statd/Makefile
+++ b/sysutils/nagios-statd/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= nagios-statd
-PORTVERSION= 3.11
+PORTVERSION= 3.12
CATEGORIES= sysutils python net-mgmt
MASTER_SITES= http://www.twoevils.org/files/netsaint_statd/
@@ -14,6 +14,7 @@ MAINTAINER= jims@bluenotch.com
COMMENT= Daemon/client to check remote host information for Nagios
USE_PYTHON= yes
+USE_RC_SUBR= nagiosstatd.sh
MAN1= nagios-stat.1
MAN8= nagios-statd.8
@@ -25,7 +26,6 @@ do-build:
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/bin/nagios-stat ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/sbin/nagios-statd ${PREFIX}/sbin
- ${INSTALL_SCRIPT} ${FILESDIR}/nagios-statd.sh.sample ${PREFIX}/etc/rc.d
${INSTALL_MAN} ${WRKSRC}/share/man1/nagios-stat.1 ${PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/share/man8/nagios-statd.8 ${PREFIX}/man/man8
diff --git a/sysutils/nagios-statd/distinfo b/sysutils/nagios-statd/distinfo
index ac2a1f572b0a..9bab62a795a5 100644
--- a/sysutils/nagios-statd/distinfo
+++ b/sysutils/nagios-statd/distinfo
@@ -1,3 +1,3 @@
-MD5 (nagios-statd-3.11.tar.gz) = aed145d2df7a261530d91ce23ae52cca
-SHA256 (nagios-statd-3.11.tar.gz) = 45813d546b143dfa19ce2cf8bfe660f701af1311260b5f485b7a0d58f581c0a1
-SIZE (nagios-statd-3.11.tar.gz) = 10767
+MD5 (nagios-statd-3.12.tar.gz) = 8048cd2975d277079de34f65306cca04
+SHA256 (nagios-statd-3.12.tar.gz) = 91560f7a7a8e0ee95fae622256951908d51d5a70744b5777973ce3dea7445166
+SIZE (nagios-statd-3.12.tar.gz) = 11054
diff --git a/sysutils/nagios-statd/files/nagios-statd.sh.sample b/sysutils/nagios-statd/files/nagios-statd.sh.sample
deleted file mode 100644
index ad5e7ae1724c..000000000000
--- a/sysutils/nagios-statd/files/nagios-statd.sh.sample
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-# $FreeBSD$
-
-case "${1}" in
-start)
- nagios-statd
- echo -n " nagios-statd"
- ;;
-stop)
- kill -3 `ps -x | grep nagios-statd | grep python | awk '{print $1}'`
- ;;
-restart)
- $0 stop
- $0 start
- ;;
-*)
- echo "Usage: $0 {start|stop|restart}"
- ;;
-esac
-
-exit 0
diff --git a/sysutils/nagios-statd/files/nagiosstatd.sh.in b/sysutils/nagios-statd/files/nagiosstatd.sh.in
new file mode 100644
index 000000000000..2b89da7b2621
--- /dev/null
+++ b/sysutils/nagios-statd/files/nagiosstatd.sh.in
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# PROVIDE: nagiosstatd
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: shutdown
+#
+#
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to enable nagiosstatd:
+# nagiosstatd_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable nagiosstatd
+#
+
+nagiosstatd_enable=${nagiosstatd_enable-"NO"}
+nagiosstatd_flags=${nagiosstatd_flags-""}
+nagiosstatd_pidfile=${nagiosstatd_pidfile-"/var/run/nagiosstatd.pid"}
+
+. %%RC_SUBR%%
+
+name="nagiosstatd"
+#rcvar=`set_rcvar`
+rcvar=${name}_enable
+
+pidfile="${nagiosstatd_file}"
+
+
+command=%%PREFIX%%/sbin/nagios-statd
+
+load_rc_config $name
+
+start_precmd="export PATH=\"$PATH:/usr/local/bin\""
+
+run_rc_command "$1"
+
diff --git a/sysutils/nagios-statd/pkg-plist b/sysutils/nagios-statd/pkg-plist
index 2fb37af965e2..51b714ec9b04 100644
--- a/sysutils/nagios-statd/pkg-plist
+++ b/sysutils/nagios-statd/pkg-plist
@@ -1,4 +1,3 @@
@comment $FreeBSD$
bin/nagios-stat
sbin/nagios-statd
-etc/rc.d/nagios-statd.sh.sample