diff --git a/move_site.sh b/move_site.sh index 0ed48c2..50aee3f 100644 --- a/move_site.sh +++ b/move_site.sh @@ -1,6 +1,7 @@ #!/bin/bash if [ -z "$6" ]; then echo "Usage: $0 ip port username password example.com user_pass"; + history -c exit 1; fi ip="$1"; @@ -24,6 +25,7 @@ function escape_slash(){ if [ "$?" != 0 ]; then echo "Please check the remote server is reachable"; unalias sudo_command; + history -c exit 1; else if [ -z "$nginx_file" ]; then @@ -36,6 +38,7 @@ else if [ -z $db_name ]; then echo "There was some error when detecting Database!" unalias sudo_command; + history -c exit 1; fi echo "Database name: $db_name"; @@ -98,5 +101,6 @@ else rm -f tmp/unicorn.sock bundle exec unicorn_rails -c config/unicorn.rb -E production echo "Finish moving and installing site!" + history -c fi fi \ No newline at end of file