Skip to content

Commit cfaee24

Browse files
committed
Merge branch 'master' of github.com:basho-labs/riak-docker
2 parents 31048ed + cd61082 commit cfaee24

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ RUN mkdir -p /etc/riak/schemas
151151
152152
WORKDIR /var/lib/riak
153153
154-
CMD $RIAK_HOME/riak-cluster.sh
154+
CMD ["$RIAK_HOME/riak-cluster.sh"]
155155
156156
# Clean up APT cache
157157
RUN rm -rf /var/lib/apt/lists/* /tmp/*

riak-cluster.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export COORDINATOR_NODE=${COORDINATOR_NODE:-$HOSTNAME}
3434
export COORDINATOR_NODE_HOST=$(ping -c1 $COORDINATOR_NODE | awk '/^PING/ {print $3}' | sed 's/[()]//g')||'127.0.0.1'
3535

3636
# Run all prestart scripts
37-
PRESTART=$(find /etc/riak/prestart.d -name *.sh -print)
37+
PRESTART=$(find /etc/riak/prestart.d -name *.sh -print | sort)
3838
for s in $PRESTART; do
3939
. $s
4040
done
@@ -44,10 +44,13 @@ $RIAK start
4444
$RIAK_ADMIN wait-for-service riak_kv
4545

4646
# Run all poststart scripts
47-
POSTSTART=$(find /etc/riak/poststart.d -name *.sh -print)
47+
POSTSTART=$(find /etc/riak/poststart.d -name *.sh -print | sort)
4848
for s in $POSTSTART; do
49-
. $s
49+
. $
5050
done
5151

52-
# Tail the log file indefinitely
53-
tail -n 1024 -f /var/log/riak/console.log
52+
# Trap SIGTERM and SIGINT and tail the log file indefinitely
53+
tail -n 1024 -f /var/log/riak/console.log &
54+
PID=$!
55+
trap "$RIAK stop; kill $PID" SIGTERM SIGINT
56+
wait $PID

0 commit comments

Comments
 (0)