|
Lines 1-7
Link Here
|
| 1 |
#!/sbin/runscript |
1 |
#!/sbin/runscript |
| 2 |
# Copyright 1999-2009 Gentoo Foundation |
2 |
# Copyright 1999-2009 Gentoo Foundation |
| 3 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# Distributed under the terms of the GNU General Public License v2 |
| 4 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/rabbitmq-server/files/rabbitmq-server.init,v 1.2 2010/08/02 23:56:58 hollow Exp $ |
|
|
| 5 |
|
4 |
|
| 6 |
depend() { |
5 |
depend() { |
| 7 |
need net |
6 |
need net |
|
Lines 9-23
Link Here
|
| 9 |
} |
8 |
} |
| 10 |
|
9 |
|
| 11 |
start() { |
10 |
start() { |
| 12 |
export HOME=/var/empty |
|
|
| 13 |
ebegin "Starting RabbitMQ..." |
11 |
ebegin "Starting RabbitMQ..." |
| 14 |
rabbitmq-server -detached |
12 |
[ -f /etc/conf.d/rabbitmq ] && . /etc/conf.d/rabbitmq |
|
|
13 |
export RABBITMQ_MNESIA_BASE RABBITMQ_LOG_BASE RABBITMQ_NODENAME RABBITMQ_NODE_IP_ADDRESS RABBITMQ_NODE_PORT RABBITMQ_CLUSTER_CONFIG_FILE |
| 14 |
export HOME=/var/lib/rabbitmq |
| 15 |
start-stop-daemon --start -c rabbitmq:rabbitmq --user rabbitmq --startas /usr/sbin/rabbitmq-server --exec /usr/lib/erlang/bin/epmd -- -detached |
| 15 |
eend $? |
16 |
eend $? |
| 16 |
} |
17 |
} |
| 17 |
|
18 |
|
| 18 |
stop() { |
19 |
stop() { |
| 19 |
ebegin "Stopping RabbitMQ..." |
20 |
ebegin "Stopping RabbitMQ..." |
| 20 |
rabbitmqctl stop |
21 |
/usr/sbin/rabbitmqctl stop |
|
|
22 |
start-stop-daemon --stop --user rabbitmq --exec /usr/lib/erlang/bin/epmd |
| 21 |
eend $? |
23 |
eend $? |
| 22 |
} |
24 |
} |
| 23 |
|
25 |
|