summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Boehm <hollow@gentoo.org>2010-08-28 14:33:03 +0000
committerBenedikt Boehm <hollow@gentoo.org>2010-08-28 14:33:03 +0000
commitba417d5d046ab0328ddd1e84fcb568daa3830d67 (patch)
tree843f56f8b88d1d285b251cebcb7b8af5381d58cd /net-misc/rabbitmq-server/files
parentRun specs. Depend on json version newer than 1.4.3 which is broken with ohai.... (diff)
downloadgentoo-2-ba417d5d046ab0328ddd1e84fcb568daa3830d67.tar.gz
gentoo-2-ba417d5d046ab0328ddd1e84fcb568daa3830d67.tar.bz2
gentoo-2-ba417d5d046ab0328ddd1e84fcb568daa3830d67.zip
version bump wrt #334543. also fixes #332391.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/rabbitmq-server/files')
-rw-r--r--net-misc/rabbitmq-server/files/rabbitmq-script-wrapper53
-rw-r--r--net-misc/rabbitmq-server/files/rabbitmq-server.init-r123
2 files changed, 76 insertions, 0 deletions
diff --git a/net-misc/rabbitmq-server/files/rabbitmq-script-wrapper b/net-misc/rabbitmq-server/files/rabbitmq-script-wrapper
new file mode 100644
index 000000000000..91b4b7c7898e
--- /dev/null
+++ b/net-misc/rabbitmq-server/files/rabbitmq-script-wrapper
@@ -0,0 +1,53 @@
+#!/bin/sh
+## The contents of this file are subject to the Mozilla Public License
+## Version 1.1 (the "License"); you may not use this file except in
+## compliance with the License. You may obtain a copy of the License at
+## http://www.mozilla.org/MPL/
+##
+## Software distributed under the License is distributed on an "AS IS"
+## basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+## License for the specific language governing rights and limitations
+## under the License.
+##
+## The Original Code is RabbitMQ.
+##
+## The Initial Developers of the Original Code are LShift Ltd,
+## Cohesive Financial Technologies LLC, and Rabbit Technologies Ltd.
+##
+## Portions created before 22-Nov-2008 00:00:00 GMT by LShift Ltd,
+## Cohesive Financial Technologies LLC, or Rabbit Technologies Ltd
+## are Copyright (C) 2007-2008 LShift Ltd, Cohesive Financial
+## Technologies LLC, and Rabbit Technologies Ltd.
+##
+## Portions created by LShift Ltd are Copyright (C) 2007-2009 LShift
+## Ltd. Portions created by Cohesive Financial Technologies LLC are
+## Copyright (C) 2007-2009 Cohesive Financial Technologies
+## LLC. Portions created by Rabbit Technologies Ltd are Copyright
+## (C) 2007-2009 Rabbit Technologies Ltd.
+##
+## All Rights Reserved.
+##
+## Contributor(s): ______________________________________.
+##
+
+# Escape spaces and quotes, because shell is revolting.
+for arg in "$@" ; do
+ # Escape quotes in parameters, so that they're passed through cleanly.
+ arg=$(sed -e 's/"/\\"/g' <<-END
+ $arg
+ END
+ )
+ CMDLINE="${CMDLINE} \"${arg}\""
+done
+
+cd /var/lib/rabbitmq
+
+SCRIPT=`basename $0`
+
+if [ `id -u` = 0 ] ; then
+ su rabbitmq -s /bin/sh -c "/usr/libexec/rabbitmq/${SCRIPT} ${CMDLINE}"
+else
+ /usr/libexec/rabbitmq/${SCRIPT}
+ echo -e "\nOnly root should run ${SCRIPT}\n"
+ exit 1
+fi
diff --git a/net-misc/rabbitmq-server/files/rabbitmq-server.init-r1 b/net-misc/rabbitmq-server/files/rabbitmq-server.init-r1
new file mode 100644
index 000000000000..d659af4499b1
--- /dev/null
+++ b/net-misc/rabbitmq-server/files/rabbitmq-server.init-r1
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/rabbitmq-server/files/rabbitmq-server.init-r1,v 1.1 2010/08/28 14:33:02 hollow Exp $
+
+depend() {
+ # uncomment this as soon as bug 334979 is fixed
+ #need epmd
+ need net
+ use dns
+}
+
+start() {
+ ebegin "Starting RabbitMQ..."
+ /usr/sbin/rabbitmq-multi start_all ${NODE_COUNT:-1} >> /var/log/rabbitmq/startup.log 2>> /var/log/rabbitmq/startup.err
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping RabbitMQ..."
+ /usr/sbin/rabbitmq-multi stop_all >> /var/log/rabbitmq/shutdown.log 2>> /var/log/rabbitmq/shutdown.err
+ eend $?
+}