Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-deploy-utils
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qa-deploy-utils
Commits
20ec463f
Commit
20ec463f
authored
Nov 16, 2017
by
qa_quantgroup
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
2cf64d3d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
26 deletions
+10
-26
db_replace_ip.sh
db-utils/db_replace_ip.sh
+10
-26
No files found.
db-utils/db_replace_ip.sh
View file @
20ec463f
...
@@ -56,44 +56,28 @@ if [ "$file_count" -gt 0 ]; then
...
@@ -56,44 +56,28 @@ if [ "$file_count" -gt 0 ]; then
do
do
sed
-i
"s/https
\:
/http
\:
/g"
$entry
sed
-i
"s/https
\:
/http
\:
/g"
$entry
if
[
"
$re_replace_ip
"
=
true
]
;
then
if
[
"
$re_replace_ip
"
=
true
]
;
then
echo
"
is
replace public ip for
$entry
"
echo
"replace public ip for
$entry
"
for
host
in
$hosts
for
host
in
$hosts
do
do
arr
=
${
host
//|/
}
arr
=
${
host
//|/
}
transByPort
$arr
$entry
transByPort
$arr
$entry
done
done
elif
[
"
$re_replace_ip
"
=
false
]
;
then
elif
[
"
$re_replace_ip
"
=
false
]
;
then
echo
"
is
replace ip for
$entry
"
echo
"replace ip for
$entry
"
for
host
in
$hosts
for
host
in
$hosts
do
do
arr
=
${
host
//|/
}
arr
=
${
host
//|/
}
transByUrl
$arr
$entry
transByUrl
$arr
$entry
done
done
else
else
echo
"is replace
$re_replace_ip
ip for
$entry
"
echo
"replace
$re_replace_ip
ip for
$entry
"
for
host
in
$hosts
echo
"sed -i "
s#.xyqb.com#-
${
re_replace_ip
}
.q-gp.com#g
"
$entry
"
do
sed
-i
"s#.xyqb.com#-
${
re_replace_ip
}
.q-gp.com#g"
$entry
arr
=
${
host
//|/
}
#for host in $hosts
transByPara
$arr
$entry
$re_replace_ip
#do
done
# arr=${host//|/ }
#echo "sed -i \"s/\/m.xyqb.com/\/${re_replace_ip}-m.xyqb.com/g\" $entry ..."
# transByPara $arr $entry $re_replace_ip
#sed -i "s/\/m.xyqb.com/\/${re_replace_ip}-m.xyqb.com/g" $entry
#done
#sed -i "s/\/bt.xyqb.com/\/${re_replace_ip}-bt.xyqb.com/g" $entry
#sed -i "s/\/api.xyqb.com/\/${re_replace_ip}-api.xyqb.com/g" $entry
#sed -i "s/\/r.xyqb.com/\/${re_replace_ip}-r.xyqb.com/g" $entry
#sed -i "s/\/rapi.xyqb.com/\/${re_replace_ip}-rapi.xyqb.com/g" $entry
#sed -i "s/\/payapi.xyqb.com/\/${re_replace_ip}-payapi.xyqb.com/g" $entry
#sed -i "s/\/pay.xyqb.com/\/${re_replace_ip}-pay.xyqb.com/g" $entry
#sed -i "s/\/off.xyqb.com/\/${re_replace_ip}-off.xyqb.com/g" $entry
#sed -i "s/\/offapi.xyqb.com/\/${re_replace_ip}-offapi.xyqb.com/g" $entry
#sed -i "s/\/financial.xyqb.com/\/${re_replace_ip}-financial.xyqb.com/g" $entry
#sed -i "s/\/fsapi.xyqb.com/\/${re_replace_ip}-fsapi.xyqb.com/g" $entry
#sed -i "s/\/auth.xyqb.com/\/${re_replace_ip}-auth.xyqb.com/g" $entry
#sed -i "s/\/qapi.xyqb.com/\/${re_replace_ip}-qapi.xyqb.com/g" $entry
#sed -i "s/\/mallapi.xyqb.com/\/${re_replace_ip}-mallapi.xyqb.com/g" $entry
#sed -i "s/\/scapi.xyqb.com/\/${re_replace_ip}-scapi.xyqb.com/g" $entry
#sed -i "s/\/gyxdapi.xyqb.com/\/${re_replace_ip}-gyxdapi.xyqb.com/g" $entry
#sed -i "s/\/btapi.xyqb.com/\/${re_replace_ip}-btapi.xyqb.com/g" $entry
fi
fi
done
done
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment