message: Make cleos use keosd via unix socket by default
diff: @@ -72,6 +72,7 @@ Options:
  ```
  */
  +#include <pwd.h>
  #include <string>
  #include <vector>
  #include <regex>
  @@ -148,8 +149,24 @@ FC_DECLARE_EXCEPTION( localized_exception, 10000000, "an error occured" );
  FC_MULTILINE_MACRO_END \
  )
  +//copy pasta from keosd's main.cpp
  +bfs::path determine_home_directory()
  +{
  + bfs::path home;
  + struct passwd* pwd = getpwuid(getuid());
  + if(pwd) {
  + home = pwd->pw_dir;
  + }
  + else {
  + home = getenv("HOME");
  + }
  + if(home.empty())
  + home = "./";
  + return home;
  +}
  +
  string url = "http://127.0.0.1:8888/";
  -string wallet_url = "http://127.0.0.1:8900/";
  +string wallet_url = "unix://" + (determine_home_directory() / "eosio-wallet" / (string(key_store_executable_name) + ".sock")).string();
  bool no_verify = false;
  vector<string> headers;
  