summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/rabbitmq-server/files/rabbitmq-server.init-r3')
-rwxr-xr-xnet-misc/rabbitmq-server/files/rabbitmq-server.init-r323
1 files changed, 23 insertions, 0 deletions
diff --git a/net-misc/rabbitmq-server/files/rabbitmq-server.init-r3 b/net-misc/rabbitmq-server/files/rabbitmq-server.init-r3
new file mode 100755
index 000000000000..f3fbaf861b9f
--- /dev/null
+++ b/net-misc/rabbitmq-server/files/rabbitmq-server.init-r3
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2011 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-r3,v 1.1 2011/09/30 07:45:54 hollow Exp $
+
+depend() {
+ need net
+ use dns epmd
+}
+
+start() {
+ ebegin "Starting RabbitMQ"
+ /usr/sbin/rabbitmq-server -detached >> /var/log/rabbitmq/startup.log 2>> /var/log/rabbitmq/startup.err
+ /usr/sbin/rabbitmqctl status | sed -n 's/[^p]*pid,\([0-9]*\)[^0-9]*/\1/p' > /var/run/rabbitmq.pid
+ /usr/sbin/rabbitmqctl -q wait /var/run/rabbitmq.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping RabbitMQ"
+ /usr/sbin/rabbitmqctl stop >> /var/log/rabbitmq/shutdown.log 2>> /var/log/rabbitmq/shutdown.err
+ eend $?
+}