aboutsummaryrefslogtreecommitdiff
path: root/databases/mongodb/files/mongod.in
diff options
context:
space:
mode:
authorWen Heping <wen@FreeBSD.org>2009-11-19 06:53:27 +0000
committerWen Heping <wen@FreeBSD.org>2009-11-19 06:53:27 +0000
commitaf4df674ff00a3def96f1eb146053ae1034b466b (patch)
tree95f3180f7bf910db4c3f0054e3d1999ddab0019d /databases/mongodb/files/mongod.in
parent76768290429b5e77a8f24ffd33d3e5c158638573 (diff)
downloadports-af4df674ff00a3def96f1eb146053ae1034b466b.tar.gz
ports-af4df674ff00a3def96f1eb146053ae1034b466b.zip
Mongo (from "humongous") is a high-performance, open source,
schema-free, document-oriented database. A common name in the "NOSQL" community. WWW: http://www.mongodb.org/ PR: ports/140144 [1] ports/140257 [2] ports/140489 [1] Submitted by: Mirko Zinn <mail@derzinn.de> [1] Ivan Voras <ivoras@FreeBSD.org> [2]
Notes
Notes: svn path=/head/; revision=244459
Diffstat (limited to 'databases/mongodb/files/mongod.in')
-rw-r--r--databases/mongodb/files/mongod.in39
1 files changed, 39 insertions, 0 deletions
diff --git a/databases/mongodb/files/mongod.in b/databases/mongodb/files/mongod.in
new file mode 100644
index 000000000000..ddfd1d5400ea
--- /dev/null
+++ b/databases/mongodb/files/mongod.in
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# PROVIDE: mongod
+# REQUIRE: NETWORK
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# mongod_enable (bool): Set to NO by default.
+# Set it to YES to enable mongod.
+#
+# Additional configurable variables:
+# mongod_config (path): Set to %%PREFIX%%/etc/mongod.conf
+# by default. Additional configuration. You
+# can also use mongod_flags for additional
+# command line arguments.
+# mongod_dbpath (path): Set to /var/db/mongod by default
+# mongod_user (username): Set to "mongod" by default
+
+. %%RC_SUBR%%
+
+name="mongod"
+rcvar=${name}_enable
+
+command=%%PREFIX%%/bin/${name}
+
+load_rc_config $name
+
+: ${mongod_enable="NO"}
+: ${mongod_config="%%PREFIX%%/etc/mongodb.conf"}
+: ${mongod_dbpath="/var/db/mongodb"}
+: ${mongod_user="mongodb"}
+
+command_args="-f $mongod_config --dbpath $mongod_dbpath --logappend --logpath $mongod_dbpath/mongod.log --fork"
+
+required_dirs=${mongod_dbpath}
+
+run_rc_command "$1"
+