diff options
| author | Paul Jones <paulj@lshift.net> | 2009-07-29 12:52:12 +0100 |
|---|---|---|
| committer | Paul Jones <paulj@lshift.net> | 2009-07-29 12:52:12 +0100 |
| commit | 7217efefd247aea60128db3d9ad72cf68d6cf84a (patch) | |
| tree | 7e4587bd14f2ddb168252464837300a39e759b5c /packaging/common | |
| parent | 890a21ca83314dab87249b04e48f54db56b71249 (diff) | |
| download | rabbitmq-server-git-7217efefd247aea60128db3d9ad72cf68d6cf84a.tar.gz | |
Updated packaging configurations to handle new rabbitmq-activate-plugins script, along with its requirement to be run as root
Diffstat (limited to 'packaging/common')
| -rw-r--r-- | packaging/common/rabbitmq-asroot-script-wrapper | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/packaging/common/rabbitmq-asroot-script-wrapper b/packaging/common/rabbitmq-asroot-script-wrapper new file mode 100644 index 0000000000..e50782cea1 --- /dev/null +++ b/packaging/common/rabbitmq-asroot-script-wrapper @@ -0,0 +1,22 @@ +#!/bin/bash +# 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/"/\\"/' <<-END + $arg + END + ) + CMDLINE="${CMDLINE} \"${arg}\"" +done + +cd /var/lib/rabbitmq + +SCRIPT=`basename $0` + +if [ `id -u` = 0 ] ; then + /usr/lib/rabbitmq/bin/${SCRIPT} ${CMDLINE} +else + echo -e "\nOnly root should run ${SCRIPT}\n" + exit 1 +fi + |
