aboutsummaryrefslogtreecommitdiffstats
path: root/databases/mongodb32
diff options
context:
space:
mode:
authorpi <pi@FreeBSD.org>2016-05-16 14:44:13 +0800
committerpi <pi@FreeBSD.org>2016-05-16 14:44:13 +0800
commit92ab3f90d5449e28d7002143aaf6bf92b2ec8d41 (patch)
tree6a90fdc0f43329c826705366950694787702ff83 /databases/mongodb32
parent96fb9701023a9ae665aec06eb0169abac5794ba9 (diff)
downloadfreebsd-ports-gnome-92ab3f90d5449e28d7002143aaf6bf92b2ec8d41.tar.gz
freebsd-ports-gnome-92ab3f90d5449e28d7002143aaf6bf92b2ec8d41.tar.zst
freebsd-ports-gnome-92ab3f90d5449e28d7002143aaf6bf92b2ec8d41.zip
databases/mongodb{32}: allows to change the config location from rc.conf
PR: 198212 Submitted by: Daniel Ylitalo Approved by: ale (maintainer timeout)
Diffstat (limited to 'databases/mongodb32')
-rw-r--r--databases/mongodb32/files/mongod.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/databases/mongodb32/files/mongod.in b/databases/mongodb32/files/mongod.in
index bdf24bea76e0..ace3936e0b51 100644
--- a/databases/mongodb32/files/mongod.in
+++ b/databases/mongodb32/files/mongod.in
@@ -16,6 +16,8 @@
# Base database directory.
# mongod_flags (str): Custom additional arguments to be passed to mongod.
# Default to "--logpath ${mongod_dbpath}/mongod.log --logappend".
+# mongod_config (str): Default to "%%PREFIX%%/etc/mongodb.conf"
+# Path to config file
#
. /etc/rc.subr
@@ -31,10 +33,11 @@ load_rc_config $name
: ${mongod_flags="--logpath ${mongod_dbpath}/mongod.log --logappend"}
: ${mongod_user="mongodb"}
: ${mongod_group="mongodb"}
+: ${mongod_config="%%PREFIX%%/etc/mongodb.conf"}
pidfile="${mongod_dbpath}/mongod.lock"
command=%%PREFIX%%/bin/${name}
-command_args="--config %%PREFIX%%/etc/mongodb.conf --dbpath $mongod_dbpath --fork >/dev/null 2>/dev/null"
+command_args="--config $mongod_config --dbpath $mongod_dbpath --fork >/dev/null 2>/dev/null"
start_precmd="${name}_prestart"
mongod_create_dbpath()