Commit de8b9cf6 authored by tywldx's avatar tywldx
parents c673c538 32ac4c40
...@@ -10,7 +10,7 @@ database_name=$1 ...@@ -10,7 +10,7 @@ database_name=$1
server_host=$2 server_host=$2
db_sub_backup_folder=$3 db_sub_backup_folder=$3
re_replace_ip=$4 re_replace_ip=$4
public_ip="www.q-gp.com" public_ip="www.liangkebang.com"
ip_last=$5 ip_last=$5
pwd_path="/home/qa-deploy-utils/qa_shell_script" pwd_path="/home/qa-deploy-utils/qa_shell_script"
config_server="$pwd_path/config_server" config_server="$pwd_path/config_server"
...@@ -26,8 +26,8 @@ hosts=`node $config_server/get_project_config.js -type multi -attr port/url -att ...@@ -26,8 +26,8 @@ hosts=`node $config_server/get_project_config.js -type multi -attr port/url -att
function transByPort() function transByPort()
{ {
if [ -n "$4" ];then if [ -n "$4" ];then
echo "sed -i \"s/\/$3.xyqb.com/\/$1-$ip_last.q-gp.com/g\" $4" echo "sed -i \"s/\/$3.xyqb.com/\/$1-$ip_last.liangkebang.com/g\" $4"
sed -i "s/\/$3.xyqb.com/\/$1-$ip_last.q-gp.com/g" $4 sed -i "s/\/$3.xyqb.com/\/$1-$ip_last.liangkebang.com/g" $4
fi fi
} }
...@@ -68,8 +68,8 @@ if [ $database_name = 'mall' ];then ...@@ -68,8 +68,8 @@ if [ $database_name = 'mall' ];then
done done
else else
echo "replace $re_replace_ip ip for $entry.sql" echo "replace $re_replace_ip ip for $entry.sql"
echo "sed -i "s#\.xyqb\.com#-${re_replace_ip}.q-gp.com#g" $entry.sql" echo "sed -i "s#\.xyqb\.com#-${re_replace_ip}.liangkebang.com#g" $entry.sql"
sed -i "s#\.xyqb\.com#-${re_replace_ip}.q-gp.com#g" $entry.sql sed -i "s#\.xyqb\.com#-${re_replace_ip}.liangkebang.com#g" $entry.sql
fi fi
done done
else else
...@@ -90,8 +90,8 @@ else ...@@ -90,8 +90,8 @@ else
done done
else else
echo "replace $re_replace_ip ip for $db_sub_backup_folder/*" echo "replace $re_replace_ip ip for $db_sub_backup_folder/*"
echo "sed -i "s#\.xyqb\.com#-${re_replace_ip}.q-gp.com#g" $db_sub_backup_folder/*" echo "sed -i "s#\.xyqb\.com#-${re_replace_ip}.liangkebang.com#g" $db_sub_backup_folder/*"
sed -i "s#\.xyqb\.com#-${re_replace_ip}.q-gp.com#g" $db_sub_backup_folder/* sed -i "s#\.xyqb\.com#-${re_replace_ip}.liangkebang.com#g" $db_sub_backup_folder/*
#for host in $hosts #for host in $hosts
#do #do
# arr=${host//|/ } # arr=${host//|/ }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment