Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 30 lines (23 sloc) 0.757 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#!/bin/sh
# Copyright (c) 2011, Couchbase, Inc.
# All rights reserved.

COUCHBASE_BIN="$(cd "$(dirname "$0")" && pwd)"
COUCHBASE_TOP="$COUCHBASE_BIN/.."
export COUCHBASE_TOP

PATH="$COUCHBASE_BIN":$PATH
export PATH

ERL_LIBS="$COUCHBASE_TOP/lib/couchdb/erlang/lib:$COUCHBASE_TOP/lib/ns_server/erlang/lib"
export ERL_LIBS

if [ x"$1" != "x" ]
then
extra_args="-log $1"
fi

REPORT_DIR="$COUCHBASE_TOP/var/lib/couchbase/logs"
if [ "$(ls "$REPORT_DIR")" == "" ]
then
    # If the usual logs dir is empty, try the usual OSX logs location...
    REPORT_DIR=~/Library/Application\ Support/Couchbase/var/lib/couchbase/logs
fi

exec erl -pa ebin -noshell -run ns_log_browser \
         -report_dir "${REPORT_DIR}" ${extra_args} \
         -run init stop -- "$@"
Something went wrong with that request. Please try again.