File: docker-entrypoint.sh

package info (click to toggle)
ruby-bunny 2.23.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,644 kB
  • sloc: ruby: 10,256; sh: 70; makefile: 8
file content (26 lines) | stat: -rwxr-xr-x 655 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
server=rabbitmq-server
ctl=rabbitmqctl
delay=5

echo 'Starting a RabbitMQ node'
$server -detached

echo "Waiting for RabbitMQ to finish startup..."

$ctl await_startup --timeout 15

$ctl add_user bunny_gem bunny_password
$ctl add_user bunny_reader reader_password

$ctl add_vhost bunny_testbed

$ctl set_permissions -p / guest '.*' '.*' '.*'
$ctl set_permissions -p bunny_testbed bunny_gem '.*' '.*' '.*'
$ctl set_permissions -p bunny_testbed guest '.*' '.*' '.*'
$ctl set_permissions -p bunny_testbed bunny_reader '^---$' '^---$' '.*'

$ctl shutdown --timeout 10

echo 'Starting a RabbitMQ node in foreground (use Ctrl-C to stop)'
exec $server