blob: b37c829a30ebe15b63e0e38f779de6eacecfc742 (
plain)
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
|
#! /bin/sh
role=$1; [ -n "$1" ] && shift
erlbase=$1; [ -n "$1" ] && shift
database=$1; [ -n "$1" ] && shift
[ -z "$erlbase" ] && erlbase=/usr/local/catlfish
[ -z "$database" ] && database=/var/db/catlfish-merge
case $role in
frontend|storage|signing)
$erlbase/bin/run_erl \
/var/run/catlfish/ \
/var/run/catlfish/erlang_log/ \
"exec $erlbase/bin/erl -config catlfish"
;;
merge)
ERL_LIBS=$erlbase/lib/catlfish-0.6.0.ez/catlfish-0.6.0
ERL_LIBS=$ERL_LIBS:$erlbase/lib/lager-2.1.1.ez/lager-2.1.1
export ERL_LIBS
$erlbase/merge.sh 60 3600 $database > merge_log/stdout 2> merge_log/stderr
;;
*)
echo "catlfish: unknown role: $role"
esac
|