diff options
author | Tomáš Levora <t.levora@partner.samsung.com> | 2019-07-09 14:07:08 +0200 |
---|---|---|
committer | Tomáš Levora <t.levora@partner.samsung.com> | 2019-07-09 14:09:09 +0200 |
commit | 20d3b8afc58ba7dc04f598a6bec04b97036004a4 (patch) | |
tree | c9893ef69bba696bad448711034d10a85ce9fd70 | |
parent | 86d690963b80241f408c1668c58f3cd6a0955dcd (diff) |
Fix docker user settings backup
Fixing docker user settings backup and restore in build_nexus_blob.sh
Issue-ID: OOM-1968
Change-Id: I3f97cb7d0c16cce083388a87aef443ab805ca0e5
Signed-off-by: Tomáš Levora <t.levora@partner.samsung.com>
-rwxr-xr-x | build/build_nexus_blob.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/build/build_nexus_blob.sh b/build/build_nexus_blob.sh index 5f4ed0ff..670c2e12 100755 --- a/build/build_nexus_blob.sh +++ b/build/build_nexus_blob.sh @@ -174,7 +174,7 @@ NEXUS_CONFIG=$(echo "${NEXUS_CONFIG_GROOVY}" | jq -Rsc '{"name":"configure", "t # Add simulated domain names to /etc/hosts HOSTS_BACKUP="$(eval ${TIMESTAMP}_hosts.bk)" -cp /etc/hosts "/etc/${HOSTS_BACKUP}" +cp /etc/hosts /etc/${HOSTS_BACKUP} for DNS in ${SIMUL_HOSTS}; do echo "127.0.0.1 ${DNS}" >> /etc/hosts done @@ -182,7 +182,7 @@ done # Backup the current docker registry settings if [ -f ~/.docker/config.json ]; then DOCKER_CONF_BACKUP="$(eval ${TIMESTAMP}_config.json.bk)" - mv ~/.docker/config.json "~/.docker/${DOCKER_CONF_BACKUP}" + mv ~/.docker/config.json ~/.docker/${DOCKER_CONF_BACKUP} fi ################################# @@ -327,10 +327,10 @@ echo "Stopping Nexus and returning backups" docker stop ${NEXUS_CONT_ID} > /dev/null # Return backed up configuration files -mv -f "/etc/${HOSTS_BACKUP}" /etc/hosts +mv -f /etc/${HOSTS_BACKUP} /etc/hosts -if [ -f "~/.docker/${DOCKER_CONF_BACKUP}" ]; then - mv -f "~/.docker/${DOCKER_CONF_BACKUP}" ~/.docker/config.json +if [ -f ~/.docker/${DOCKER_CONF_BACKUP} ]; then + mv -f ~/.docker/${DOCKER_CONF_BACKUP} ~/.docker/config.json fi # Return default settings |