Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #303 from alphagov/fix-replicate-script
Browse files Browse the repository at this point in the history
Fix hostname check in replicate script
  • Loading branch information
robyoung committed May 28, 2014
2 parents f0c1cae + f234112 commit 1fd39bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/replicate-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# one.
#

if [ "$(hostname)" == "vm" ]; then
echo "This script should be run on the host machine!"
if [ "$(hostname)" == "development-1" ]; then
echo "This script should be run on the host machine, not your virtual machine!"
exit 1
fi

Expand Down Expand Up @@ -54,7 +54,7 @@ ssh $SOURCE_HOST "tar czvf ${FILENAME} ${DUMPDIR}"
# scp tar
scp $SOURCE_HOST:~/$FILENAME .

# cleanup preview machine
# clean up remote machine
ssh $SOURCE_HOST "rm -Rf ${FILENAME} ${DUMPDIR}"

# mongorestore
Expand Down

0 comments on commit 1fd39bc

Please sign in to comment.