aboutsummaryrefslogtreecommitdiff
path: root/net/stund/files/stund.in
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2012-08-05 23:19:36 +0000
committerDoug Barton <dougb@FreeBSD.org>2012-08-05 23:19:36 +0000
commit9aac569eaa031e27191a3f4165b389a17f467ad2 (patch)
tree1ed78841e1757014ccc09581c61c3683992d3f77 /net/stund/files/stund.in
parent47b836bfe5c397deb173a868525d4cba22cbb5fa (diff)
downloadports-9aac569eaa031e27191a3f4165b389a17f467ad2.tar.gz
ports-9aac569eaa031e27191a3f4165b389a17f467ad2.zip
Notes
Diffstat (limited to 'net/stund/files/stund.in')
-rw-r--r--net/stund/files/stund.in34
1 files changed, 34 insertions, 0 deletions
diff --git a/net/stund/files/stund.in b/net/stund/files/stund.in
new file mode 100644
index 000000000000..56da993c33b2
--- /dev/null
+++ b/net/stund/files/stund.in
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: stund
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: DAEMON
+# KEYWORD: shutdown
+
+. /etc/rc.subr
+
+: ${stund_enable:=NO}
+: ${stund_pidfile:=/var/run/stund.pid}
+: ${stund_flags="-h \"\$stund_ip1\" -a \"\$stund_ip2\" -b"}
+
+name="stund"
+command="%%PREFIX%%/sbin/stund"
+rcvar=stund_enable
+extra_commands="status"
+pidfile="$stund_pidfile"
+
+load_rc_config $name
+
+start_precmd=stund_prestart
+stund_prestart() {
+ if [ -z "$stund_ip1" -o -z "$stund_ip2" ]; then
+ echo stund: failed: you must set stund_ip1 and stund_ip2 1>&2
+ return 1
+ fi
+ return 0
+}
+
+run_rc_command "$1"