summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcatlfish-dev/start.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/catlfish-dev/start.sh b/catlfish-dev/start.sh
index d673b9d..3a982fb 100755
--- a/catlfish-dev/start.sh
+++ b/catlfish-dev/start.sh
@@ -1,8 +1,11 @@
#! /bin/sh
+# Required arguments.
logname=$1; [ -n "$1" ] && shift
role=$1; [ -n "$1" ] && shift
nodename=$1; [ -n "$1" ] && shift
+
+# Optional arguments.
database=$CATLFISH_DB_DIR
erlbase=$ERLANG_BASE_DIR
@@ -10,20 +13,23 @@ erlbase=$ERLANG_BASE_DIR
[ -z "$database" ] && database=/var/db/catlfish-merge
[ -z "$erlbase" ] && erlbase=/usr/local/catlfish
-# We should probably grab this from the
+# FIXME: Get compileconfig.py from the
# $erlbase/lib/catlfish-$VERSION.ez (zip archive) instead of requiring
# source code to be unpacked in the container.
COMPILECONFIG=/usr/local/src/catlfish/tools/compileconfig.py
case $role in
frontend|storage|signing)
- $COMPILECONFIG --config ${logname}.cfg \
- --localconfig ${nodename}.cfg;
+ if ! [ -f ${nodename}.config ]; then
+ $COMPILECONFIG --config ${logname}.cfg \
+ --localconfig ${nodename}.cfg;
+ fi
$erlbase/bin/run_erl \
/var/run/catlfish/ \
/var/run/catlfish/erlang_log/ \
"exec $erlbase/bin/erl -config $nodename"
;;
+
merge)
# Catlfish version is included in filename of archive and
# filename in that archive. Example: lib/catlfish-0.6.0.ez
@@ -37,7 +43,9 @@ case $role in
export MERGE_INTERVAL_FREQ=3600
export MERGE_DB_DIR=$database
- $erlbase/merge.sh $logname $nodename > merge_log/stdout 2> merge_log/stderr
+ $erlbase/merge.sh $logname $nodename \
+ > merge_log/stdout \
+ 2> merge_log/stderr
;;
*)
echo "catlfish: unknown role: $role"