[dev-db/mongodb] for 6 migrate socket to /run and change logdir creation to tmpfiles
This commit is contained in:
parent
94ebf5ce48
commit
360db7b1ab
36
dev-db/mongodb/files/mongodb.conf-r4
Normal file
36
dev-db/mongodb/files/mongodb.conf-r4
Normal file
@ -0,0 +1,36 @@
|
||||
# !! IMPORTANT !!
|
||||
#
|
||||
# This file uses the YAML format as described in the documentation:
|
||||
# http://docs.mongodb.org/manual/reference/configuration-options/
|
||||
|
||||
storage:
|
||||
dbPath: "/var/lib/mongodb"
|
||||
#engine: wiredTiger
|
||||
|
||||
systemLog:
|
||||
destination: file
|
||||
path: "/var/log/mongodb/mongodb.log"
|
||||
quiet: true
|
||||
logAppend: true
|
||||
|
||||
net:
|
||||
port: 27017
|
||||
bindIp: 127.0.0.1
|
||||
unixDomainSocket:
|
||||
pathPrefix: "/run/mongodb"
|
||||
#ssl:
|
||||
# mode: disabled
|
||||
|
||||
#security:
|
||||
#keyFile:
|
||||
#clusterAuthMode:
|
||||
|
||||
#replication:
|
||||
#replSetName:
|
||||
|
||||
# Specifies one of the MongoDB parameters described here:
|
||||
# http://docs.mongodb.org/manual/reference/parameters/
|
||||
#
|
||||
# You can specify multiple setParameter fields such as:
|
||||
# setParameter: {enableTestCommands: 1}
|
||||
#setParameter:
|
@ -1,10 +0,0 @@
|
||||
[Unit]
|
||||
Description=High-performance, schema-free document-oriented database
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=mongodb
|
||||
ExecStart=/usr/bin/mongod --quiet --config /etc/mongodb.conf
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
2
dev-db/mongodb/files/mongodb.tmpfiles
Normal file
2
dev-db/mongodb/files/mongodb.tmpfiles
Normal file
@ -0,0 +1,2 @@
|
||||
d /var/log/mongodb 0750 mongodb mongodb -
|
||||
d /run/mongodb 0750 mongodb mongodb -
|
32
dev-db/mongodb/files/mongos.conf-r3
Normal file
32
dev-db/mongodb/files/mongos.conf-r3
Normal file
@ -0,0 +1,32 @@
|
||||
# !! IMPORTANT !!
|
||||
#
|
||||
# This file uses the YAML format as described in the documentation:
|
||||
# http://docs.mongodb.org/manual/reference/configuration-options/
|
||||
|
||||
systemLog:
|
||||
destination: file
|
||||
path: "/var/log/mongodb/mongos.log"
|
||||
quiet: true
|
||||
logAppend: true
|
||||
|
||||
net:
|
||||
port: 27017
|
||||
bindIp: 127.0.0.1
|
||||
unixDomainSocket:
|
||||
pathPrefix: "/run/mongodb"
|
||||
ssl:
|
||||
mode: disabled
|
||||
|
||||
#security:
|
||||
#keyFile:
|
||||
#clusterAuthMode:
|
||||
|
||||
#sharding:
|
||||
#configDB:
|
||||
|
||||
# Specifies one of the MongoDB parameters described here:
|
||||
# http://docs.mongodb.org/manual/reference/parameters/
|
||||
#
|
||||
# You can specify multiple setParameter fields such as:
|
||||
# setParameter: {enableTestCommands: 1}
|
||||
#setParameter:
|
@ -10,7 +10,7 @@ CHECKREQS_DISK_BUILD="2400M"
|
||||
CHECKREQS_DISK_USR="512M"
|
||||
CHECKREQS_MEMORY="1024M"
|
||||
|
||||
inherit check-reqs flag-o-matic multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs
|
||||
inherit check-reqs flag-o-matic multiprocessing pax-utils python-any-r1 scons-utils systemd tmpfiles toolchain-funcs
|
||||
|
||||
MY_PV=r${PV/_rc/-rc}
|
||||
MY_P=mongo-${MY_PV}
|
||||
@ -191,22 +191,23 @@ src_install() {
|
||||
newconfd "${FILESDIR}/mongos.confd-r3" mongos
|
||||
|
||||
insinto /etc
|
||||
newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
|
||||
newins "${FILESDIR}/mongos.conf-r2" mongos.conf
|
||||
newins "${FILESDIR}/${PN}.conf-r4" ${PN}.conf
|
||||
newins "${FILESDIR}/mongos.conf-r3" mongos.conf
|
||||
|
||||
systemd_newunit "${FILESDIR}/${PN}.service-r1" "${PN}.service"
|
||||
|
||||
dotmpfiles "${FILESDIR}"/mongodb.tempfiles mongodb.conf
|
||||
|
||||
insinto /etc/logrotate.d/
|
||||
newins "${FILESDIR}/${PN}.logrotate" ${PN}
|
||||
|
||||
# see bug #526114
|
||||
pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
|
||||
|
||||
diropts -m0750 -o mongodb -g mongodb
|
||||
keepdir /var/log/${PN}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
tmpfiles_process mongodb.conf
|
||||
|
||||
ewarn "Make sure to read the release notes and follow the upgrade process:"
|
||||
ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/"
|
||||
ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/#upgrade-procedures"
|
||||
|
Loading…
Reference in New Issue
Block a user