Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 348538 Details for
Bug 470174
dev-db/mongodb - Add the ability to start multiple instances of a mongodb server
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Init script based on the memcached init script
file_470174.txt (text/plain), 2.09 KB, created by
Christian Kaps
on 2013-05-17 14:55:49 UTC
(
hide
)
Description:
Init script based on the memcached init script
Filename:
MIME Type:
Creator:
Christian Kaps
Created:
2013-05-17 14:55:49 UTC
Size:
2.09 KB
patch
obsolete
>#!/sbin/runscript ># Copyright 1999-2013 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/files/mongodb.initd,v 1.5 2013/01/18 11:19:27 ultrabug Exp $ > >CONF="${SVCNAME#*.}" >CONFBASE="/etc/conf.d/mongodb" > >[ -z "${MONGODB_EXEC}" ] && MONGODB_EXEC="/usr/bin/mongod" >[ -z "${MONGODB_RUN}" ] && MONGODB_RUN="/var/run/mongodb" >[ -z "${MONGODB_DATA}" ] && MONGODB_DATA="/var/lib/mongodb" >[ -z "${MONGODB_USER}" ] && MONGODB_USER="mongodb" >[ -z "${MONGODB_PORT}" ] && MONGODB_PORT="27017" >[ "${CONF}" == "mongodb" ] && CONF='' > >if [ -n "${CONF}" ]; then > PIDFILE="${MONGODB_RUN}/mongodb-${MONGODB_PORT}.${CONF}.pid" > CONFSRC="${CONFBASE}.${CONF}" > if [ -f "${CONFSRC}" ]; then > source "${CONFSRC}" > else > eerror "The configuration file $CONFSRC was not found!" > fi >else > PIDFILE="${MONGODB_RUN}/mongodb-${MONGODB_PORT}.pid" > CONFSRC="${CONFBASE}" >fi > >depend() { > need net >} > >checkconfig() { > if [ -z "${MONGODB_IP}" ]; then > ewarn "You should edit $CONFSRC and specify an address to listen on." > ewarn "Listening on any address (check your firewall!)" > fi >} > >start() { > ebegin "Starting ${SVCNAME}" > checkconfig > checkpath -d -m 0750 -o "${MONGODB_USER}":mongodb "${MONGODB_RUN}" > > # Listen to MONGODB_IP if configured > [ -z "${MONGODB_IP}" ] || MONGODB_OPTIONS="--bind_ip ${MONGODB_IP} ${MONGODB_OPTIONS}" > > # Baselayout-1 user should use --chuid instead of --user > local USEROPT="--user" > if [ ! -f /etc/init.d/sysfs ]; then > USEROPT="--chuid" > fi > > start-stop-daemon --background --start --make-pidfile \ > --pidfile ${PIDFILE} \ > ${USEROPT} ${MONGODB_USER} \ > --exec ${MONGODB_EXEC} \ > -- \ > --port ${MONGODB_PORT} \ > --dbpath ${MONGODB_DATA} \ > --unixSocketPrefix ${MONGODB_RUN} \ > --logappend --logpath /var/log/mongodb/${SVCNAME}.log \ > ${MONGODB_OPTIONS} > eend $? >} > >stop() { > ebegin "Stopping ${SVCNAME}" > start-stop-daemon --stop --pidfile ${PIDFILE} > eend $? >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 470174
: 348538