diff options
author | Linus Nordberg <linus@nordberg.se> | 2015-04-25 06:04:25 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2015-04-25 06:17:36 +0200 |
commit | d4f06b7846db8745c696fc1a38e1ffac9b462f1c (patch) | |
tree | 4b8493581897d34b849238cd04f5c575201f62af /packaging | |
parent | f174a72d10037e2e6356fbee3f71ea124515d758 (diff) |
[docker] Change order of arguments to start.sh.
NOTE: This is an incompatible change. Second argument, after role, is
now the database path for merge. Erlang base dir is now the third
argument
Diffstat (limited to 'packaging')
-rwxr-xr-x | packaging/docker/catlfish-dev/start.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/packaging/docker/catlfish-dev/start.sh b/packaging/docker/catlfish-dev/start.sh index b37c829..904ea10 100755 --- a/packaging/docker/catlfish-dev/start.sh +++ b/packaging/docker/catlfish-dev/start.sh @@ -1,11 +1,12 @@ #! /bin/sh role=$1; [ -n "$1" ] && shift -erlbase=$1; [ -n "$1" ] && shift database=$1; [ -n "$1" ] && shift +erlbase=$1; [ -n "$1" ] && shift -[ -z "$erlbase" ] && erlbase=/usr/local/catlfish +# Set sane defaults. [ -z "$database" ] && database=/var/db/catlfish-merge +[ -z "$erlbase" ] && erlbase=/usr/local/catlfish case $role in frontend|storage|signing) @@ -15,11 +16,17 @@ case $role in "exec $erlbase/bin/erl -config catlfish" ;; merge) - ERL_LIBS=$erlbase/lib/catlfish-0.6.0.ez/catlfish-0.6.0 + # Catlfish version is included in filename of archive and + # filename in that archive. Example: lib/catlfish-0.6.0.ez + # contains catlfish-0.6.0. + ver=$(ls $erlbase/lib/catlfish-*.ez | sed 's/.*-\(.*\)\.ez/\1/1') + ERL_LIBS=$erlbase/lib/catlfish-${ver}.ez/catlfish-${ver} 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 |