summaryrefslogtreecommitdiff
path: root/catlfish-dev/start.sh
diff options
context:
space:
mode:
Diffstat (limited to 'catlfish-dev/start.sh')
-rwxr-xr-xcatlfish-dev/start.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/catlfish-dev/start.sh b/catlfish-dev/start.sh
index bef885e..22030bb 100755
--- a/catlfish-dev/start.sh
+++ b/catlfish-dev/start.sh
@@ -6,11 +6,9 @@ role=$1; [ -n "$1" ] && shift
nodename=$1; [ -n "$1" ] && shift
# Optional arguments.
-database=$CATLFISH_DB_DIR
erlbase=$ERLANG_BASE_DIR
# Use some reasonable default values.
-[ -z "$database" ] && database=/var/db/catlfish-merge
[ -z "$erlbase" ] && erlbase=/usr/local/catlfish
# FIXME: Get compileconfig.py from the
@@ -20,9 +18,13 @@ COMPILECONFIG=/usr/local/src/catlfish/tools/compileconfig.py
case $role in
frontend|storage|signing)
- if ! [ -f ${nodename}.config ]; then
- $COMPILECONFIG --config ${logname}.cfg \
- --localconfig ${nodename}.cfg;
+ if [ -f /usr/local/etc/catlfish/${nodename}.config ]; then
+ ln -s /usr/local/etc/catlfish/${nodename}.config
+ else
+ mkdir ${nodename}
+ $COMPILECONFIG --config /usr/local/etc/catlfish/${logname}.cfg \
+ --localconfig /usr/local/etc/catlfish/${nodename}.cfg;
+ ln -s ${nodename}/${nodename}.config
fi
$erlbase/bin/run_erl \
/var/run/catlfish/ \
@@ -42,11 +44,9 @@ case $role in
ERL_LIBS=$ERL_LIBS:$erlbase/lib/lager-2.1.1.ez/lager-2.1.1
export ERL_LIBS
- export MERGE_INTERVAL_FIRST=60
- export MERGE_INTERVAL_FREQ=3600
- export MERGE_DB_DIR=$database
+ [ -z "${MERGE_DB_DIR}" ] && MERGE_DB_DIR=merge-db
- $erlbase/merge.sh $logname $nodename \
+ $erlbase/merge.sh ${logname} ${nodename} \
> merge_log/stdout \
2> merge_log/stderr
;;