diff options
author | Jason Smith (work) <jhs@iriscouch.com> | 2013-02-12 14:05:48 +0000 |
---|---|---|
committer | Jason Smith (work) <jhs@iriscouch.com> | 2013-02-12 14:05:48 +0000 |
commit | f638bc143b7550d8f5472046ea4d8063f239859d (patch) | |
tree | 9718cdc82ea6a548e46dca9d6a10e178b54174cc | |
parent | 2853a11402bae6dab100d897b70384c070f583b9 (diff) | |
download | couchdb-f638bc143b7550d8f5472046ea4d8063f239859d.tar.gz |
More environment variables for the daemon
-rw-r--r-- | src/couchdb/couch_os_daemons.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/couchdb/couch_os_daemons.erl b/src/couchdb/couch_os_daemons.erl index a11818bcb..f83266129 100644 --- a/src/couchdb/couch_os_daemons.erl +++ b/src/couchdb/couch_os_daemons.erl @@ -195,6 +195,7 @@ code_change(_OldVsn, State, _Extra) -> start_port(?NODEJS_EXTRA) -> Port = couch_config:get("httpd", "port"), + PrivDir = couch_util:priv_dir(), % This is kind of bad. The environment variable is ok for the child, % however it also sets for this process. The only reason is to @@ -209,7 +210,11 @@ start_port(?NODEJS_EXTRA) -> Found end, - Env = [ {"_couchdb_port",Port}, {"_couchdb_password",Password} ], + GitPort1 = 10000 + random:uniform(10000) * 2, + GitPort = integer_to_list(GitPort1), + + Env = [ {"_couchdb_port",Port}, {"_couchdb_password",Password}, + {"_couchdb_git_port",GitPort}, {"_couchdb_priv_dir",PrivDir} ], start_port(?NODEJS_EXTRA, Env); start_port(Command) -> |