couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Cottlehuber <...@jsonified.com>
Subject Re: eacces error
Date Thu, 04 Oct 2012 14:13:01 GMT
On 4 October 2012 12:58, Noah Slater <nslater@tumbolia.org> wrote:
> Should we patch this before the move to an OTP system? Does anybody have a
> patch?

I'll take a look, something like chdir to /usr/local/var/run/couchdb
or similar might be an approach. I think on Windows at least it
matters where CouchDB is running from, but it uses a different method
of starting up vs *nix so that should be OK.

@Martin does this patch fix it? Just ensure your /usr/* paths match up.

--- /usr/local/bin/couchdb	2012-10-04 16:06:16.000000000 +0200
+++ /tmp/couchdb	2012-10-04 16:06:02.000000000 +0200
@@ -27,6 +27,7 @@
 KILL=false
 LOCAL_CONFIG_DIR=/usr/local/etc/couchdb/local.d
 LOCAL_CONFIG_FILE=/usr/local/etc/couchdb/local.ini
+LOCAL_RUN_DIR=/usr/local/var/run/couchdb/
 PID_FILE=/usr/local/var/run/couchdb/couchdb.pid
 RECURSED=false
 RESET_CONFIG=true
@@ -220,13 +221,16 @@
         check_environment
     fi
     interactive_option="+Bd -noinput"
+    working_dir=$PWD
     if test "$INTERACTIVE" = "true"; then
         interactive_option=""
+        working_dir=$LOCAL_RUN_DIR
     fi
     if test "$BACKGROUND" = "true"; then
         touch $PID_FILE
         interactive_option="+Bd -noinput"
     fi
+    cd $working_dir
     command="/usr/local/opt/erlang/bin/erl $interactive_option
$ERL_START_OPTIONS \
         -env ERL_LIBS
/usr/local/Cellar/couchdb/HEAD/lib/couchdb/erlang/lib -couch_ini
$start_arguments -s couch"
     if test "$BACKGROUND" = "true" -a "$RECURSED" = "false"; then

I've got a patch against master if this works.

A+
Dave

Mime
View raw message