Packged by jafour1 and updated by some users. Mongo (from "humongous") is a high-performance, open source, schema-free, document-oriented database. It features: document data model with dynamic schemas; full, flexible index support and rich queries; auto-Sharding for horizontal scalability; built-in replication for high availability; text search; advanced security; aggregation Framework and MapReduce; large media storage with GridFS.
37 lines
988 B
Bash
37 lines
988 B
Bash
#!@RCD_SCRIPTS_SHELL@
|
|
#
|
|
# $NetBSD: mongodb.sh,v 1.1 2015/05/02 08:10:33 ryoon Exp $
|
|
#
|
|
# PROVIDE: mongodb
|
|
# REQUIRE: DAEMON LOGIN mountall
|
|
# KEYWORD: shutdown
|
|
#
|
|
# You will need to set some variables in /etc/rc.conf to start MongoDB:
|
|
#
|
|
# mongodb=YES
|
|
#
|
|
# The following variables are optional:
|
|
#
|
|
# mongodb_user="@MONGODB_USER@" # user to run mongod as
|
|
# mongodb_group="@MONGODB_GROUP@" # group to run mongod as
|
|
# mongodb_dbpath="@MONGODB_DBPATH@" # path to MongoDB database directory
|
|
#
|
|
|
|
if [ -f /etc/rc.subr ]; then
|
|
. /etc/rc.subr
|
|
fi
|
|
|
|
name="mongodb"
|
|
rcvar=${name}
|
|
command="@PREFIX@/bin/mongod"
|
|
: ${mongodb_user:=@MONGODB_USER@}
|
|
: ${mongodb_group:=@MONGODB_GROUP@}
|
|
: ${mongodb_dbpath:=@MONGODB_DBPATH@}
|
|
pidfile="${mongodb_dbpath}/mongod.pid"
|
|
logfile="${mongodb_dbpath}/mongod.log"
|
|
required_dirs="${mongodb_dbpath}"
|
|
|
|
command_args="--fork --logpath ${logfile} --logappend --pidfilepath ${pidfile} --dbpath ${mongodb_dbpath} --smallfiles"
|
|
|
|
load_rc_config ${name}
|
|
run_rc_command "$1"
|