#!/bin/sh
# Copyright (c) 2011, Membase, Inc.
# All rights reserved.
cd `dirname $0`
mkdir logs > /dev/null 2>&1

# Initialize distributed erlang on the system (i.e. epmd)
if [ -z "$DONT_START_EPMD" ]; then
  erl -noshell -setcookie nocookie -sname init -run init stop 2>&1 > /dev/null
fi

exec erl \
    +A 16 \
    -pa `find . -type d -name ebin` \
    -setcookie nocookie \
    -run ns_bootstrap \
    -ns_server error_logger_mf_dir '"logs"' \
    -ns_server error_logger_mf_maxbytes 10485760 \
    -ns_server error_logger_mf_maxfiles 10 \
    -ns_server dont_suppress_stderr_logger true \
    -kernel inet_dist_listen_min 21100 inet_dist_listen_max 21199 \
    -- "$@"

#!/bin/sh
# Copyright (c) 2011, Membase, Inc.
# All rights reserved.
basedir=${0##*/}
cd "$basedir"

mkdir logs > /dev/null 2>&1

# Initialize distributed erlang on the system (i.e. epmd)
if [ -z "$DONT_START_EPMD" ]; then
  erl -noshell -setcookie nocookie -sname init -run init stop 2>&1 > /dev/null
fi

exec erl \
    +A 16 \
    -pa `find . -type d -name ebin` \
    -setcookie nocookie \
    -run ns_bootstrap \
    -ns_server error_logger_mf_dir '"logs"' \
    -ns_server error_logger_mf_maxbytes 10485760 \
    -ns_server error_logger_mf_maxfiles 10 \
    -ns_server dont_suppress_stderr_logger true \
    -kernel inet_dist_listen_min 21100 inet_dist_listen_max 21199 \
    -- "$@"

Allow starting in directories containing spaces.
Allow starting in directories containing spaces.

Change-Id: I73171f75a04d67fbe1b6dcc96883ceac8cea82f8
Reviewed-on: http://review.membase.org/5074
Tested-by: Dustin Sallings <1c08efb9b3965701be9d700d9a6f481f1ffec3ea@spy.net>
Tested-by: Aliaksey Kandratsenka <340b8e09ca65cd3fc686427fcfed17e87eaf61e2@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <340b8e09ca65cd3fc686427fcfed17e87eaf61e2@gmail.com>
