diff options
author | Thomas Zander <riggs@FreeBSD.org> | 2017-05-14 12:48:56 +0000 |
---|---|---|
committer | Thomas Zander <riggs@FreeBSD.org> | 2017-05-14 12:48:56 +0000 |
commit | a201de8ee60897927b850f1d4d8accfa0a476504 (patch) | |
tree | 40e927c46ae70bad107786c2064ced667e72285a /databases/mongodb34-rocks | |
parent | d7fd628e2a958f1d314f988a1d829c178f8c8e72 (diff) | |
download | ports-a201de8ee60897927b850f1d4d8accfa0a476504.tar.gz ports-a201de8ee60897927b850f1d4d8accfa0a476504.zip |
Notes
Diffstat (limited to 'databases/mongodb34-rocks')
-rw-r--r-- | databases/mongodb34-rocks/Makefile | 1 | ||||
-rw-r--r-- | databases/mongodb34-rocks/files/mongos.in | 59 | ||||
-rw-r--r-- | databases/mongodb34-rocks/pkg-descr | 2 |
3 files changed, 61 insertions, 1 deletions
diff --git a/databases/mongodb34-rocks/Makefile b/databases/mongodb34-rocks/Makefile index 820b235197e9..a982a6958043 100644 --- a/databases/mongodb34-rocks/Makefile +++ b/databases/mongodb34-rocks/Makefile @@ -3,6 +3,7 @@ PORTNAME= mongodb PORTVERSION= 3.4.4 DISTVERSIONPREFIX= r +PORTREVISION= 1 CATEGORIES= databases net MASTER_SITES= https://fastdl.mongodb.org/src/:main \ http://fastdl.mongodb.org/src/:main \ diff --git a/databases/mongodb34-rocks/files/mongos.in b/databases/mongodb34-rocks/files/mongos.in new file mode 100644 index 000000000000..3698a18cae83 --- /dev/null +++ b/databases/mongodb34-rocks/files/mongos.in @@ -0,0 +1,59 @@ +#!/bin/sh + +# PROVIDE: mongos +# REQUIRE: NETWORK ldconfig +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# mongos_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable mongos. +# mongos_limits (bool): Set to "NO" by default. +# Set it to yes to run `limits -e -U mongodb` +# just before mongos starts. +# mongos_flags (str): Custom additional arguments to be passed to mongos. +# Default to "--logpath /var/log/mongodb/mongos.log --logappend". +# mongos_config (str): Default to "%%PREFIX%%/etc/mongos.conf" +# Path to config file +# + +. /etc/rc.subr + +name="mongos" +rcvar=mongos_enable + +load_rc_config $name + +: ${mongos_enable="NO"} +: ${mongos_limits="NO"} +: ${mongos_logpath="/var/log/mongodb"} +: ${mongos_flags="--logpath ${mongos_logpath}/mongos.log --logappend"} +: ${mongos_user="mongodb"} +: ${mongos_group="mongodb"} +: ${mongos_config="%%PREFIX%%/etc/mongos.conf"} + +pidfile="/var/run/mongodb/mongos.pid" +command=%%PREFIX%%/bin/${name} +command_args="--config $mongos_config --fork >/dev/null 2>/dev/null" +start_precmd="${name}_prestart" + +mongos_create_dbpath() +{ + mkdir ${mongos_logpath} >/dev/null 2>/dev/null + [ $? -eq 0 ] && chown -R ${mongos_user}:${mongos_group} ${mongos_logpath} +} + +mongos_prestart() +{ + if [ ! -d ${mongos_logpath} ]; then + mongos_create_dbpath || return 1 + fi + if checkyesno mongos_limits; then + eval `/usr/bin/limits -e -U ${mongos_user}` 2>/dev/null + else + return 0 + fi +} + +run_rc_command "$1" diff --git a/databases/mongodb34-rocks/pkg-descr b/databases/mongodb34-rocks/pkg-descr index 0561aff05acb..8852fbe83fd6 100644 --- a/databases/mongodb34-rocks/pkg-descr +++ b/databases/mongodb34-rocks/pkg-descr @@ -2,6 +2,6 @@ Mongo (from "humongous") is a high-performance, open source, schema-free, document-oriented database. A common name in the "NOSQL" community. -This port uses a RocksDB Storage Engine as a MongoDB backend. +This port can optionally use a RocksDB Storage Engine as a MongoDB backend. WWW: http://www.mongodb.org/ |