Skip to content

Commit 7851f13

Browse files
author
Matthias Radestock
committed
remove/add files missed on previous commit
1 parent ba0ef93 commit 7851f13

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
# Escape spaces and quotes, because shell is revolting.
3+
for arg in "$@" ; do
4+
# Escape quotes in parameters, so that they're passed through cleanly.
5+
arg=$(sed -e 's/"/\\"/' <<-END
6+
$arg
7+
END
8+
)
9+
CMDLINE="${CMDLINE} \"${arg}\""
10+
done
11+
12+
cd /var/lib/rabbitmq
13+
14+
SCRIPT=`basename $0`
15+
16+
if [ `id -u` = 0 ] ; then
17+
su rabbitmq -s /bin/sh -c "/usr/lib/rabbitmq/bin/${SCRIPT} ${CMDLINE}"
18+
else
19+
/usr/lib/rabbitmq/bin/${SCRIPT}
20+
echo -e "\nOnly root should run ${SCRIPT}\n"
21+
exit 1
22+
fi
23+

packaging/macports/net/rabbitmq-server/files/rabbitmqctl_wrapper

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)