blob: 3fc41496ea1fc9d812d34c5feab5cb645952a00d [file] [log] [blame]
Instrumental32cdd552018-07-19 13:29:32 -05001#!/bin/bash
2. ./d.props
3
Instrumentalab502672018-08-20 14:31:35 -05004function run_it() {
5 docker run $@ \
Instrumental32cdd552018-07-19 13:29:32 -05006 --mount 'type=volume,src=aaf_config,dst='$CONF_ROOT_DIR',volume-driver=local' \
7 --add-host="$HOSTNAME:$HOST_IP" \
8 --add-host="aaf.osaaf.org:$HOST_IP" \
Instrumental54883b42018-09-25 07:56:54 -05009 --env HOSTNAME=${HOSTNAME} \
Instrumental32cdd552018-07-19 13:29:32 -050010 --env AAF_ENV=${AAF_ENV} \
11 --env AAF_REGISTER_AS=${AAF_REGISTER_AS} \
12 --env LATITUDE=${LATITUDE} \
13 --env LONGITUDE=${LONGITUDE} \
14 --name aaf_config_$USER \
Instrumentale44d2f72018-08-16 17:22:45 -050015 $PREFIX${ORG}/${PROJECT}/aaf_config:${VERSION} \
Instrumentalab502672018-08-20 14:31:35 -050016 /bin/bash $PARAMS
17}
18
Instrumentalaeb80c82018-08-21 10:24:08 -050019function set_prop() {
20docker exec -t aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP setProp "$1" "$2" "$3"
21}
22
Instrumentalab502672018-08-20 14:31:35 -050023function encrypt_it() {
24 docker exec -t aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP encrypt "$1" "$2"
25}
26
Instrumentalb8a81292018-08-23 16:32:45 -050027function set_it() {
28 docker exec -t aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP setProp "$1" "$2"
29}
30
Instrumentalab502672018-08-20 14:31:35 -050031PARAMS="$@"
32if [ "$PARAMS" != "" ]; then
33 run_it -it --rm
34fi
35