1
0
mirror of https://github.com/oceanprotocol/barge.git synced 2024-11-22 01:37:01 +01:00

Resets secret store config on startup

Now networks/secret-store/config/config.toml may be mutated, but
is always reset when running start_ocean.sh

Fixes #126

Signed-off-by: Tom Marble <tmarble@info9.net>
This commit is contained in:
Tom Marble 2019-03-28 17:07:20 -05:00
parent 45ea0d3e20
commit 6a5180a31a
No known key found for this signature in database
GPG Key ID: 40BFEE868B055D9A
3 changed files with 22 additions and 2 deletions

14
.gitignore vendored
View File

@ -1,5 +1,17 @@
.idea/
# Project specific
artifacts/
ganache-db/
# IDE side effects
.idea/
# Emacs
*~
# mutable secret store config (Issue #126)
networks/secret-store/config/config.toml
# Mac OS Filesystem artifacts
.DS_Store
**/.DS_Store
._*

View File

@ -74,6 +74,14 @@ function show_banner {
echo ""
}
function configure_secret_store {
# restore default secret store config (Issue #126)
if [ -e "$DIR/networks/secret-store/config/config.toml.save" ]; then
cp "$DIR/networks/secret-store/config/config.toml.save" \
"$DIR/networks/secret-store/config/config.toml"
fi
}
function check_if_owned_by_root {
if [ -d "$OCEAN_HOME" ]; then
uid=$(ls -nd "$OCEAN_HOME" | awk '{print $3;}')
@ -256,6 +264,7 @@ while :; do
;;
*)
printf $COLOR_Y'Starting Ocean...\n\n'$COLOR_RESET
configure_secret_store
[ ! -z ${NODE_COMPOSE_FILE} ] && COMPOSE_FILES+=" -f ${NODE_COMPOSE_FILE}"
[ ${FORCEPULL} = "true" ] && docker-compose $DOCKER_COMPOSE_EXTRA_OPTS --project-name=$PROJECT_NAME $COMPOSE_FILES pull
eval docker-compose $DOCKER_COMPOSE_EXTRA_OPTS --project-name=$PROJECT_NAME $COMPOSE_FILES up --remove-orphans
@ -263,4 +272,3 @@ while :; do
esac
shift
done