aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorjylefort <jylefort@FreeBSD.org>2006-03-19 10:24:30 +0800
committerjylefort <jylefort@FreeBSD.org>2006-03-19 10:24:30 +0800
commit391766f2a5df26b426df38da825322784f4732b1 (patch)
tree2ebd0ea1a4bac5431c2ce2070f2592f037869c0b /sysutils
parent00949c1cf445f65f5aadedda72d98133338bdbfa (diff)
downloadfreebsd-ports-gnome-391766f2a5df26b426df38da825322784f4732b1.tar.gz
freebsd-ports-gnome-391766f2a5df26b426df38da825322784f4732b1.tar.zst
freebsd-ports-gnome-391766f2a5df26b426df38da825322784f4732b1.zip
Add a rcng startup script for the daemon mode.
PR: ports/94610 Submitted by: Douglas K. Rand <rand@meridian-enviro.com>
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/mbmon/Makefile6
-rw-r--r--sysutils/mbmon/files/mbmon.sh.in32
2 files changed, 37 insertions, 1 deletions
diff --git a/sysutils/mbmon/Makefile b/sysutils/mbmon/Makefile
index 397aa646b326..32aed5130344 100644
--- a/sysutils/mbmon/Makefile
+++ b/sysutils/mbmon/Makefile
@@ -7,7 +7,7 @@
PORTNAME?= mbmon
PORTVERSION= 205
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES= sysutils
MASTER_SITES= http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/xmbmon/
DISTNAME= xmbmon${PORTVERSION}
@@ -26,6 +26,10 @@ PORTDOCS= ChangeLog ChangeLog.jp ReadMe ReadMe.jp ReadMe.tech
OPTIONS= SMB "enable smb(4) support" on
+.if ${PORTNAME} == "mbmon"
+USE_RC_SUBR= mbmon.sh
+.endif
+
.include <bsd.port.pre.mk>
post-patch:
diff --git a/sysutils/mbmon/files/mbmon.sh.in b/sysutils/mbmon/files/mbmon.sh.in
new file mode 100644
index 000000000000..61d317f39ee5
--- /dev/null
+++ b/sysutils/mbmon/files/mbmon.sh.in
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: mbmon
+# REQUIRE: LOGIN
+# BEFORE: securelevel
+# KEYWORD: FreeBSD shutdown
+
+# Add the following line to /etc/rc.conf to enable the mbmon daemon:
+#
+# mbmon_enable="YES"
+#
+# See mbmon(1) for mbmon_flags
+# Set mbmon_port to the TCP port to listen to, default is 12999
+
+. %%RC_SUBR%%
+
+name="mbmon"
+rcvar=`set_rcvar`
+
+# read configuration and set defaults
+load_rc_config "$name"
+: ${mbmon_enable="NO"}
+: ${mbmon_flags=""}
+: ${mbmon_port="12999"}
+
+command="%%PREFIX%%/bin/${name}"
+command_args="-P ${mbmon_port}"
+
+run_rc_command "$1"