summaryrefslogtreecommitdiff
path: root/packaging/docker/catlfish-dev/start.sh
blob: 60ba44a5469e0681498c93d9caa43ebf7b92c5a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /bin/sh

role=$1; shift
erlbase=$1; shift
database=$1; shift

case $role in
    frontend|storage|sign)
        $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-dev.ez/catlfish-0.6.0-dev
        ERL_LIBS=$ERL_LIBS:$erlbase/lib/lager-2.1.1.ez/lager-2.1.1
        $erlbase/merge.sh 300 3600 $database
        ;;
    *)
        echo "catlfish: unknown role: $role"
esac