diff --git a/rebar.config b/rebar.config index 5eba13c60..fb8f40de0 100644 --- a/rebar.config +++ b/rebar.config @@ -84,7 +84,6 @@ {template, "rel/files/riak-debug", "bin/riak-debug"}, {template, "rel/files/riak-chkconfig", "bin/riak-chkconfig"}, {template, "rel/files/riak-repl", "bin/riak-repl"}, - {template, "rel/files/check_riak_config", "bin/check_riak_config"}, {copy, "rel/files/check_ulimit", "bin/hooks/prestart/check_ulimit"} ]}, diff --git a/rel/files/check_riak_config b/rel/files/check_riak_config deleted file mode 100644 index d643cad46..000000000 --- a/rel/files/check_riak_config +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env escript -%% -*- erlang -*- - -main([ConfigPath]) -> - try - {ok, _} = file:consult(ConfigPath), - io:format("config is OK\n") - catch - _:_ -> - io:format("Error reading ~p\n", [ConfigPath]) - end. diff --git a/rel/files/riak-chkconfig b/rel/files/riak-chkconfig index df7f8946f..9d521460e 100644 --- a/rel/files/riak-chkconfig +++ b/rel/files/riak-chkconfig @@ -8,5 +8,16 @@ ## "vm.args = $VMARGS_PATH" ## "app.config = $CONFIG_PATH" -$ERTS_DIR/bin/escript $RELEASE_ROOT_DIR/bin/check_riak_config $CONFIG_PATH +CODE=" try + {ok, _} = file:consult(\"$CONFIG_PATH\"), + io:format(\"config is OK\\n\"), + halt(0) + catch + _:_ -> + io:format(\"Error reading ~p\\n\", [\"$CONFIG_PATH\"]), + halt(1) + end." + +$BINDIR/erl -noshell -boot start_clean -eval "$CODE" + echo $CUTTLE_CONF