summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/mongodb/ChangeLog8
-rw-r--r--dev-db/mongodb/files/mms-agent.confd9
-rw-r--r--dev-db/mongodb/files/mms-agent.initd13
-rw-r--r--dev-db/mongodb/mongodb-1.8.4-r1.ebuild (renamed from dev-db/mongodb/mongodb-1.8.4.ebuild)3
4 files changed, 30 insertions, 3 deletions
diff --git a/dev-db/mongodb/ChangeLog b/dev-db/mongodb/ChangeLog
index 4da2a2959f4d..1ab0088ac0d6 100644
--- a/dev-db/mongodb/ChangeLog
+++ b/dev-db/mongodb/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-db/mongodb
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/ChangeLog,v 1.23 2011/10/27 07:56:16 ultrabug Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/ChangeLog,v 1.24 2011/10/27 12:55:50 ultrabug Exp $
+
+*mongodb-1.8.4-r1 (27 Oct 2011)
+
+ 27 Oct 2011; Ultrabug <ultrabug@gentoo.org> -mongodb-1.8.4.ebuild,
+ +mongodb-1.8.4-r1.ebuild, +files/mms-agent.confd, files/mms-agent.initd:
+ Fix mms-agent settings overwrite by adding a confd file.
*mongodb-1.8.4 (26 Oct 2011)
diff --git a/dev-db/mongodb/files/mms-agent.confd b/dev-db/mongodb/files/mms-agent.confd
new file mode 100644
index 000000000000..d19b21e2d32b
--- /dev/null
+++ b/dev-db/mongodb/files/mms-agent.confd
@@ -0,0 +1,9 @@
+# Your API key - See: http://mms.10gen.com/settings
+API_KEY=""
+SECRET_KEY=""
+
+# Seconds between Mongo status checks
+#COLLECTION_INTERVAL=56
+
+# Seconds between cloud configuration checks
+#CONF_INTERVAL=120 \ No newline at end of file
diff --git a/dev-db/mongodb/files/mms-agent.initd b/dev-db/mongodb/files/mms-agent.initd
index 684037aa08b0..45e42eaa1e1a 100644
--- a/dev-db/mongodb/files/mms-agent.initd
+++ b/dev-db/mongodb/files/mms-agent.initd
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/files/mms-agent.initd,v 1.1 2011/10/27 07:56:16 ultrabug Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/files/mms-agent.initd,v 1.2 2011/10/27 12:55:50 ultrabug Exp $
ROOTDIR=/opt/mms-agent
PIDFILE=/var/run/mm-agent.pid
@@ -15,6 +15,17 @@ depend() {
start() {
ebegin "Starting ${SVCNAME}"
+
+ # Setup API/SECRETY KEYS
+ sed -i -e "s/^mms_key.*/mms_key = '${API_KEY}'/g" \
+ -e "s/^secret_key.*/secret_key = '${SECRET_KEY}'/g" ${ROOTDIR}/settings.py &>/dev/null
+
+ # Tune the agent
+ [ -z "${COLLECTION_INTERVAL}" ] || sed -i \
+ -e "s/^collection_interval.*/collection_interval = ${COLLECTION_INTERVAL}/g" ${ROOTDIR}/settings.py &>/dev/null
+ [ -z "${CONF_INTERVAL}" ] || sed -i \
+ -e "s/^conf_interval.*/conf_interval = ${CONF_INTERVAL}/g" ${ROOTDIR}/settings.py &>/dev/null
+
start-stop-daemon --start --chdir ${ROOTDIR} --exec ${EXEC} \
--pidfile "${PIDFILE}" --make-pidfile --background \
--user mongodb:mongodb --stdout ${LOGFILE} --stderr ${LOGFILE}
diff --git a/dev-db/mongodb/mongodb-1.8.4.ebuild b/dev-db/mongodb/mongodb-1.8.4-r1.ebuild
index 7bb5ecee003f..fd7daa645b7f 100644
--- a/dev-db/mongodb/mongodb-1.8.4.ebuild
+++ b/dev-db/mongodb/mongodb-1.8.4-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/mongodb-1.8.4.ebuild,v 1.1 2011/10/27 07:56:16 ultrabug Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/mongodb-1.8.4-r1.ebuild,v 1.1 2011/10/27 12:55:50 ultrabug Exp $
EAPI=4
SCONS_MIN_VERSION="1.2.0"
@@ -77,6 +77,7 @@ src_install() {
doins "${WORKDIR}/${MY_PN}/"*
fowners -R mongodb:mongodb ${MY_D}
newinitd "${FILESDIR}/${MY_PN}.initd" ${MY_PN}
+ newconfd "${FILESDIR}/${MY_PN}.confd" ${MY_PN}
fi
}