Instrumental | 32cdd55 | 2018-07-19 13:29:32 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | . ./d.props |
| 3 | |
Instrumental | ab50267 | 2018-08-20 14:31:35 -0500 | [diff] [blame] | 4 | function run_it() { |
| 5 | docker run $@ \ |
Instrumental | 32cdd55 | 2018-07-19 13:29:32 -0500 | [diff] [blame] | 6 | --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 \ |
Instrumental | e44d2f7 | 2018-08-16 17:22:45 -0500 | [diff] [blame] | 14 | $PREFIX${ORG}/${PROJECT}/aaf_config:${VERSION} \ |
Instrumental | ab50267 | 2018-08-20 14:31:35 -0500 | [diff] [blame] | 15 | /bin/bash $PARAMS |
| 16 | } |
| 17 | |
Instrumental | aeb80c8 | 2018-08-21 10:24:08 -0500 | [diff] [blame] | 18 | function set_prop() { |
| 19 | docker exec -t aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP setProp "$1" "$2" "$3" |
| 20 | } |
| 21 | |
Instrumental | ab50267 | 2018-08-20 14:31:35 -0500 | [diff] [blame] | 22 | function encrypt_it() { |
| 23 | docker exec -t aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP encrypt "$1" "$2" |
| 24 | } |
| 25 | |
Instrumental | b8a8129 | 2018-08-23 16:32:45 -0500 | [diff] [blame] | 26 | function set_it() { |
| 27 | docker exec -t aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP setProp "$1" "$2" |
| 28 | } |
| 29 | |
Instrumental | ab50267 | 2018-08-20 14:31:35 -0500 | [diff] [blame] | 30 | PARAMS="$@" |
| 31 | if [ "$PARAMS" != "" ]; then |
| 32 | run_it -it --rm |
| 33 | fi |
| 34 | |