File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ RUN mkdir -p /etc/riak/schemas
151151
152152WORKDIR /var/lib/riak
153153
154- CMD $RIAK_HOME/riak-cluster.sh
154+ CMD [" $RIAK_HOME/riak-cluster.sh"]
155155
156156# Clean up APT cache
157157RUN rm -rf /var/lib/apt/lists/* /tmp/*
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export COORDINATOR_NODE=${COORDINATOR_NODE:-$HOSTNAME}
3434export 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 )
3838for s in $PRESTART ; do
3939 . $s
4040done
@@ -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 )
4848for s in $POSTSTART ; do
49- . $s
49+ . $
5050done
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
You can’t perform that action at this time.
0 commit comments