diff options
author | riggs <riggs@FreeBSD.org> | 2017-07-16 21:00:10 +0800 |
---|---|---|
committer | riggs <riggs@FreeBSD.org> | 2017-07-16 21:00:10 +0800 |
commit | f7f30f2240dd567ca0d1f69f4c7f484961cccaca (patch) | |
tree | 9405a714e4b9247cd631b7dd3b2c38a9e33aac20 /databases | |
parent | 40fcafadff743f0df360de7386408724a7e297bf (diff) | |
download | freebsd-ports-gnome-f7f30f2240dd567ca0d1f69f4c7f484961cccaca.tar.gz freebsd-ports-gnome-f7f30f2240dd567ca0d1f69f4c7f484961cccaca.tar.zst freebsd-ports-gnome-f7f30f2240dd567ca0d1f69f4c7f484961cccaca.zip |
Fix initial startup: Create missing /var/run/mongodb folder
PR: 219700
Submitted by: numisemis@yahoo.com (maintainer)
MFH: 2017Q3
Diffstat (limited to 'databases')
-rw-r--r-- | databases/mongodb34-rocks/Makefile | 2 | ||||
-rw-r--r-- | databases/mongodb34-rocks/files/mongod.in | 9 | ||||
-rw-r--r-- | databases/mongodb34-rocks/files/mongos.in | 7 |
3 files changed, 10 insertions, 8 deletions
diff --git a/databases/mongodb34-rocks/Makefile b/databases/mongodb34-rocks/Makefile index d243776e9301..417ca149d335 100644 --- a/databases/mongodb34-rocks/Makefile +++ b/databases/mongodb34-rocks/Makefile @@ -3,7 +3,7 @@ PORTNAME= mongodb PORTVERSION= 3.4.4 DISTVERSIONPREFIX= r -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= databases net MASTER_SITES= https://fastdl.mongodb.org/src/ \ http://fastdl.mongodb.org/src/ \ diff --git a/databases/mongodb34-rocks/files/mongod.in b/databases/mongodb34-rocks/files/mongod.in index 3878e3f68a54..a7d1d3833bbb 100644 --- a/databases/mongodb34-rocks/files/mongod.in +++ b/databases/mongodb34-rocks/files/mongod.in @@ -31,21 +31,22 @@ load_rc_config $name : ${mongod_limits="NO"} : ${mongod_dbpath="/var/db/mongodb"} : ${mongod_logpath="/var/log/mongodb"} +: ${mongod_runpath="/var/run/mongodb"} : ${mongod_flags="--logpath ${mongod_logpath}/mongod.log --logappend"} : ${mongod_user="mongodb"} : ${mongod_group="mongodb"} : ${mongod_config="%%PREFIX%%/etc/mongod.conf"} -pidfile="/var/run/mongodb/mongod.pid" +pidfile="${mongod_runpath}/mongod.pid" command=%%PREFIX%%/bin/${name} command_args="--config $mongod_config --dbpath $mongod_dbpath --fork >/dev/null 2>/dev/null" start_precmd="${name}_prestart" mongod_create_dbpath() { - mkdir ${mongod_dbpath} >/dev/null 2>/dev/null - mkdir ${mongod_logpath} >/dev/null 2>/dev/null - [ $? -eq 0 ] && chown -R ${mongod_user}:${mongod_group} ${mongod_dbpath} ${mongod_logpath} + install -d -g ${mongod_group} -o ${mongod_user} -m 755 ${mongod_dbpath} + install -d -g ${mongod_group} -o ${mongod_user} -m 755 ${mongod_logpath} + install -d -g ${mongod_group} -o ${mongod_user} -m 755 ${mongod_runpath} } mongod_prestart() diff --git a/databases/mongodb34-rocks/files/mongos.in b/databases/mongodb34-rocks/files/mongos.in index 3698a18cae83..b1d2da68eb0e 100644 --- a/databases/mongodb34-rocks/files/mongos.in +++ b/databases/mongodb34-rocks/files/mongos.in @@ -28,20 +28,21 @@ load_rc_config $name : ${mongos_enable="NO"} : ${mongos_limits="NO"} : ${mongos_logpath="/var/log/mongodb"} +: ${mongos_runpath="/var/run/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" +pidfile="${mongos_runpath}/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} + install -d -g ${mongos_group} -o ${mongos_user} -m 755 ${mongos_logpath} + install -d -g ${mongos_group} -o ${mongos_user} -m 755 ${mongos_runpath} } mongos_prestart() |