Commits

Kirill Korinskiy committed b38614d

Fix a typos :(

Comments (0)

Files changed (4)

 	    get_from_config(cookie), " ",
 	    get_from_config(sasl_logfile), " -run riak start ",
 	    Config]);
-main(["start-jooin", Config, Node])->
+main(["start-join", Config, Node])->
     init(Config),
     os:putenv("HEART_COMMAND", get_from_config(heart_command)),
     os:cmd(["erl -heart -detached -connect_all false -pa deps/*/ebin -pa ebin ",
 	    get_from_config(cookie), " ",
 	    get_from_config(sasl_logfile), " -run riak start ",
 	    Config, "-run riak_startup join_cluster ", Node]);
+main(["start-restart", Config])->
+    init(Config),
+    os:putenv("HEART_COMMAND", get_from_config(heart_command)),
+    os:cmd(["erl -heart -detached -connect_all false -pa deps/*/ebin -pa ebin ",
+	    get_from_config(hostname), " ",
+	    get_from_config(cookie), " ",
+	    get_from_config(sasl_logfile), " -run riak start ",
+	    Config, "-run riak_startup rejoin"]);
 main(_)->
     usage().
 fi
 
 . riak-env.sh
-./riakctl start-fresh $0
+./riakctl start-fresh $1
     exit 1
 fi
 . riak-env.sh
-./riakctl start-join $0 $1
+./riakctl start-join $1 $2
     exit 1
 fi
 . riak-env.sh
-echo $ERL_MAX_ETS_TABLES
-NODENAME=$(erl -noshell -pa ebin -eval "error_logger:tty(false), riak_app:read_config(\"$1\"), io:format(\"~s~n\",[riak:get_app_env(riak_nodename, riak)])" -run init stop)
-HOSTNAME=$(erl -noshell -pa ebin -eval "error_logger:tty(false), riak_app:read_config(\"$1\"), io:format(\"~s~n\",[riak:get_app_env(riak_hostname, `hostname -f`)])" -run init stop)
-COOKIE=$(erl -noshell -pa ebin -eval "error_logger:tty(false), riak_app:read_config(\"$1\"), io:format(\"~s~n\",[riak:get_app_env(riak_cookie)])" -run init stop)
-SASL_LOG=$(erl -noshell -pa ebin -eval "error_logger:tty(false), riak_app:read_config(\"$1\"), io:format(\"~s~n\",[riak:get_app_env(sasl_logfile)])" -run init stop)
-export HEART_COMMAND=$(erl -noshell -pa ebin -eval "error_logger:tty(false), riak_app:read_config(\"$1\"), io:format(\"~s~n\",[riak:get_app_env(riak_heart_command)])" -run init stop)
-exec erl -heart -detached -connect_all false -pa deps/*/ebin -pa ebin -name ${NODENAME}@${HOSTNAME} -setcookie ${COOKIE} -sasl sasl_error_logger \{file,\ \"${SASL_LOG}\"\} -run riak start $1 -run riak_startup rejoin
+./riakctl start-join $1