Fix bug.
This commit is contained in:
parent
1fb83b89e5
commit
9b95f37c93
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [ -z "$6" ]; then
|
if [ -z "$6" ]; then
|
||||||
echo "Usage: $0 ip port username password example.com user_pass";
|
echo "Usage: $0 ip port username password example.com user_pass";
|
||||||
|
history -c
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
ip="$1";
|
ip="$1";
|
||||||
|
@ -24,6 +25,7 @@ function escape_slash(){
|
||||||
if [ "$?" != 0 ]; then
|
if [ "$?" != 0 ]; then
|
||||||
echo "Please check the remote server is reachable";
|
echo "Please check the remote server is reachable";
|
||||||
unalias sudo_command;
|
unalias sudo_command;
|
||||||
|
history -c
|
||||||
exit 1;
|
exit 1;
|
||||||
else
|
else
|
||||||
if [ -z "$nginx_file" ]; then
|
if [ -z "$nginx_file" ]; then
|
||||||
|
@ -36,6 +38,7 @@ else
|
||||||
if [ -z $db_name ]; then
|
if [ -z $db_name ]; then
|
||||||
echo "There was some error when detecting Database!"
|
echo "There was some error when detecting Database!"
|
||||||
unalias sudo_command;
|
unalias sudo_command;
|
||||||
|
history -c
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
echo "Database name: $db_name";
|
echo "Database name: $db_name";
|
||||||
|
@ -98,5 +101,6 @@ else
|
||||||
rm -f tmp/unicorn.sock
|
rm -f tmp/unicorn.sock
|
||||||
bundle exec unicorn_rails -c config/unicorn.rb -E production
|
bundle exec unicorn_rails -c config/unicorn.rb -E production
|
||||||
echo "Finish moving and installing site!"
|
echo "Finish moving and installing site!"
|
||||||
|
history -c
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
Loading…
Reference in New Issue