Skip to content

Commit 8dcae40

Browse files
authored
Merge pull request #975 from martincox/develop-3.0
Change the chkconfig script to 'nodetool eval' with inline erlang
2 parents 660862d + 74efdcc commit 8dcae40

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

rebar.config

-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
{template, "rel/files/riak-debug", "bin/riak-debug"},
8585
{template, "rel/files/riak-chkconfig", "bin/riak-chkconfig"},
8686
{template, "rel/files/riak-repl", "bin/riak-repl"},
87-
{template, "rel/files/check_riak_config", "bin/check_riak_config"},
8887

8988
{copy, "rel/files/check_ulimit", "bin/hooks/check_ulimit"},
9089
{copy, "rel/files/riak_not_running", "bin/hooks/riak_not_running"}

rel/files/check_riak_config

-11
This file was deleted.

rel/files/riak-chkconfig

+12-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,16 @@
88
## "vm.args = $VMARGS_PATH"
99
## "app.config = $CONFIG_PATH"
1010

11-
$ERTS_DIR/bin/escript $RELEASE_ROOT_DIR/bin/check_riak_config $CONFIG_PATH
11+
CODE=" try
12+
{ok, _} = file:consult(\"$CONFIG_PATH\"),
13+
io:format(\"config is OK\\n\"),
14+
halt(0)
15+
catch
16+
_:_ ->
17+
io:format(\"Error reading ~p\\n\", [\"$CONFIG_PATH\"]),
18+
halt(1)
19+
end."
20+
21+
$BINDIR/erl -noshell -boot start_clean -eval "$CODE"
22+
1223
echo $CUTTLE_CONF

0 commit comments

Comments
 (0)