Commit ea91b47e authored by tywldx's avatar tywldx

fix

parent 204eed24
...@@ -23,31 +23,31 @@ cd $db_sub_backup_folder ...@@ -23,31 +23,31 @@ cd $db_sub_backup_folder
file_count=`ls -l |grep "^-"|wc -l` file_count=`ls -l |grep "^-"|wc -l`
hosts=`node $config_server/get_project_config.js -type multi -attr port/url` hosts=`node $config_server/get_project_config.js -type multi -attr port/url -attr2 true`
function transByPort() function transByPort()
{ {
if [ -n "$4" ];then if [ -n "$4" ];then
echo "sed -i \"s/\/$3/\/$1-$ip_last.q-gp.com/g\" $4" echo "sed -i \"s/\/$3.xyqb.com/\/$1-$ip_last.q-gp.com/g\" $4"
sed -i "s/\/$3/\/$1-$ip_last.q-gp.com/g" $4 sed -i "s/\/$3.xyqb.com/\/$1-$ip_last.q-gp.com/g" $4
fi fi
} }
function transByUrl() function transByUrl()
{ {
if [ -n "$4" ];then if [ -n "$4" ];then
echo "sed -i \"s/\/$3/\/${server_host}:$2/g\" $4" echo "sed -i \"s/\/$3.xyqb.com/\/${server_host}:$2/g\" $4"
sed -i "s/\/$3/\/${server_host}:$2/g" $4 sed -i "s/\/$3.xyqb.com/\/${server_host}:$2/g" $4
fi fi
} }
function transByPara() # function transByPara()
{ # {
if [ -n "$5" ];then # if [ -n "$5" ];then
echo "sed -i \"s/\/$3/\/$5-$3/g\" $4" # echo "sed -i \"s/\/$3/\/$5-$3/g\" $4"
sed -i "s/\/$3/\/$5-$3/g" $4 # sed -i "s/\/$3/\/$5-$3/g" $4
fi # fi
} # }
echo "./* file count is $file_count" echo "./* file count is $file_count"
if [ "$file_count" -gt 0 ]; then if [ "$file_count" -gt 0 ]; then
......
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