summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-misc/rabbitmq-server/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-misc/rabbitmq-server/files')
-rw-r--r--net-misc/rabbitmq-server/files/rabbitmq-script-wrapper54
-rwxr-xr-xnet-misc/rabbitmq-server/files/rabbitmq-server.init-r323
-rw-r--r--net-misc/rabbitmq-server/files/rabbitmq.service16
3 files changed, 93 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..23f3d75a42cf
--- /dev/null
+++ b/net-misc/rabbitmq-server/files/rabbitmq-script-wrapper
@@ -0,0 +1,54 @@
+#!/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.
+CMDLINE=""
+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-r3 b/net-misc/rabbitmq-server/files/rabbitmq-server.init-r3
new file mode 100755
index 000000000000..9e8c1c4873c2
--- /dev/null
+++ b/net-misc/rabbitmq-server/files/rabbitmq-server.init-r3
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/run/rabbitmq.pid >> /var/log/rabbitmq/shutdown.log 2>> /var/log/rabbitmq/shutdown.err
+ eend $?
+}
diff --git a/net-misc/rabbitmq-server/files/rabbitmq.service b/net-misc/rabbitmq-server/files/rabbitmq.service
new file mode 100644
index 000000000000..9264b406713f
--- /dev/null
+++ b/net-misc/rabbitmq-server/files/rabbitmq.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=RabbitMQ daemon
+
+[Service]
+Type=simple
+ExecStart=/usr/libexec/rabbitmq/rabbitmq-server
+ExecStop=/usr/libexec/rabbitmq/rabbitmqctl stop
+WorkingDirectory=/var/lib/rabbitmq
+User=rabbitmq
+Group=rabbitmq
+StandardOutput=syslog
+StandardError=syslog
+Restart=always
+
+[Install]
+WantedBy=multi-user.target