This commit is contained in:
BoHung Chiu 2022-07-08 21:49:34 +08:00
parent 1fb83b89e5
commit 9b95f37c93
1 changed files with 4 additions and 0 deletions

View File

@ -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