Spotter-VM/rabbitmq/setup/etc/init.d/rabbitmq

20 lines
327 B
Plaintext
Executable File

#!/sbin/openrc-run
description="RabbitMQ container"
depend() {
need cgroups
}
start() {
lxc-start rabbitmq
}
start_post() {
timeout -t 60 sh -c 'until grep -q "Server startup complete" /var/lib/lxc/rabbitmq/delta0/var/log/rabbitmq/rabbit@rabbitmq.log 2>/dev/null; do usleep 50000; done'
}
stop() {
lxc-stop rabbitmq
}