aboutsummaryrefslogtreecommitdiff
path: root/www/mongoose/files/mongoose.in
diff options
context:
space:
mode:
Diffstat (limited to 'www/mongoose/files/mongoose.in')
-rw-r--r--www/mongoose/files/mongoose.in39
1 files changed, 39 insertions, 0 deletions
diff --git a/www/mongoose/files/mongoose.in b/www/mongoose/files/mongoose.in
new file mode 100644
index 000000000000..b6070e587216
--- /dev/null
+++ b/www/mongoose/files/mongoose.in
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: mongoose
+# REQUIRE: daemon
+
+# Define these mongoose_* variables in one of these files:
+# /etc/rc.conf
+# /etc/rc.conf.local
+# /etc/rc.conf.d/mongoose
+#
+# mongoose_enable Set to "YES" to run mongoose.
+# mongoose_flags Flags passed to mongoose, see mongoose --help
+
+. /etc/rc.subr
+
+name="mongoose"
+rcvar=mongoose_enable
+command="%%PREFIX%%/bin/mongoose"
+
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+mongoose_enable=${mongoose_enable-"NO"}
+mongoose_flags=${mongoose_flags-"/var/empty"}
+mongoose_pidfile=${mongoose_pidfile-"/var/run/mongoose"}
+
+start_cmd="mongoose_start"
+
+load_rc_config $name
+
+mongoose_start () {
+ echo "Starting mongoose."
+ /usr/sbin/daemon -p $mongoose_pidfile $command $mongoose_flags >/dev/null 2>&1
+}
+
+run_rc_command "$1"