blob: 1290ea78523811dee998f95b1599238e71e6c806 [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" \
9 --env AAF_ENV=${AAF_ENV} \
10 --env AAF_REGISTER_AS=${AAF_REGISTER_AS} \
11 --env LATITUDE=${LATITUDE} \
12 --env LONGITUDE=${LONGITUDE} \
13 --name aaf_config_$USER \
Instrumentale44d2f72018-08-16 17:22:45 -050014 $PREFIX${ORG}/${PROJECT}/aaf_config:${VERSION} \
Instrumentalab502672018-08-20 14:31:35 -050015 /bin/bash $PARAMS
16}
17
Instrumentalaeb80c82018-08-21 10:24:08 -050018function set_prop() {
19docker exec -t aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP setProp "$1" "$2" "$3"
20}
21
Instrumentalab502672018-08-20 14:31:35 -050022function encrypt_it() {
23 docker exec -t aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP encrypt "$1" "$2"
24}
25
Instrumentalb8a81292018-08-23 16:32:45 -050026function set_it() {
27 docker exec -t aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP setProp "$1" "$2"
28}
29
Instrumentalab502672018-08-20 14:31:35 -050030PARAMS="$@"
31if [ "$PARAMS" != "" ]; then
32 run_it -it --rm
33fi
34