Blame rabbitmq-asroot-script-wrapper

Hubert Plociniczak 1b1224
#!/bin/sh
Hubert Plociniczak 597ff1
##   The contents of this file are subject to the Mozilla Public License
Hubert Plociniczak 597ff1
##   Version 1.1 (the "License"); you may not use this file except in
Hubert Plociniczak 597ff1
##   compliance with the License. You may obtain a copy of the License at
Hubert Plociniczak 597ff1
##   http://www.mozilla.org/MPL/
Hubert Plociniczak 597ff1
##
Hubert Plociniczak 597ff1
##   Software distributed under the License is distributed on an "AS IS"
Hubert Plociniczak 597ff1
##   basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
Hubert Plociniczak 597ff1
##   License for the specific language governing rights and limitations
Hubert Plociniczak 597ff1
##   under the License.
Hubert Plociniczak 597ff1
##
Hubert Plociniczak 597ff1
##   The Original Code is RabbitMQ.
Hubert Plociniczak 597ff1
##
Hubert Plociniczak 597ff1
##   The Initial Developers of the Original Code are LShift Ltd,
Hubert Plociniczak 597ff1
##   Cohesive Financial Technologies LLC, and Rabbit Technologies Ltd.
Hubert Plociniczak 597ff1
##
Hubert Plociniczak 597ff1
##   Portions created before 22-Nov-2008 00:00:00 GMT by LShift Ltd,
Hubert Plociniczak 597ff1
##   Cohesive Financial Technologies LLC, or Rabbit Technologies Ltd
Hubert Plociniczak 597ff1
##   are Copyright (C) 2007-2008 LShift Ltd, Cohesive Financial
Hubert Plociniczak 597ff1
##   Technologies LLC, and Rabbit Technologies Ltd.
Hubert Plociniczak 597ff1
##
Hubert Plociniczak 1b1224
##   Portions created by LShift Ltd are Copyright (C) 2007-2010 LShift
Hubert Plociniczak 597ff1
##   Ltd. Portions created by Cohesive Financial Technologies LLC are
Hubert Plociniczak 1b1224
##   Copyright (C) 2007-2010 Cohesive Financial Technologies
Hubert Plociniczak 597ff1
##   LLC. Portions created by Rabbit Technologies Ltd are Copyright
Hubert Plociniczak 1b1224
##   (C) 2007-2010 Rabbit Technologies Ltd.
Hubert Plociniczak 597ff1
##
Hubert Plociniczak 597ff1
##   All Rights Reserved.
Hubert Plociniczak 597ff1
##
Hubert Plociniczak 597ff1
##   Contributor(s): ______________________________________.
Hubert Plociniczak 597ff1
##
Hubert Plociniczak 597ff1
Hubert Plociniczak 597ff1
cd /var/lib/rabbitmq
Hubert Plociniczak 597ff1
Hubert Plociniczak 597ff1
SCRIPT=`basename $0`
Hubert Plociniczak 597ff1
Hubert Plociniczak 597ff1
if [ `id -u` = 0 ] ; then
Hubert Plociniczak 1b1224
    /usr/lib/rabbitmq/bin/${SCRIPT} "$@"
Hubert Plociniczak 597ff1
else
Hubert Plociniczak 1b1224
    echo
Hubert Plociniczak 1b1224
    echo "Only root should run ${SCRIPT}"
Hubert Plociniczak 1b1224
    echo
Hubert Plociniczak 597ff1
    exit 1
Hubert Plociniczak 597ff1
fi
Hubert Plociniczak 597ff1