diff options
author | Linus Nordberg <linus@nordu.net> | 2015-06-12 19:11:49 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2015-06-12 19:11:49 +0200 |
commit | 6525c3517ba47195dc2790c9a7ec5e546e672c6a (patch) | |
tree | 21bdfe115e0ab6752c4ce69914fffea8a5441cf6 /catlfish-dev | |
parent | 70c27d2ec55f046b6ce90ffc6c54393122f2e3e3 (diff) |
Fix paths for catlfish config file. Don't use CATLFISH_DB_DIR.
Diffstat (limited to 'catlfish-dev')
-rwxr-xr-x | catlfish-dev/start.sh | 18 |
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 ;; |