Commit 3a06d5ed authored by QA-甘 盛聪's avatar QA-甘 盛聪

update

parent 70e29930
#!/bin/bash
base_path=/home/sub_config_file_dont_rm
function tranceConfig()
{
type_=$1
source_str=$2
target_str=$3
ip_host=$4
file_name=$5
echo "
source_str: $source_str
target_str: $target_str
ip_host: $ip_host
file_name: $file_name
"
if [ "$type_" = "java" ]
then
sed -i "s/$source_str/$target_str/g" $base_path/$ip_host/java/$file_name
sed -i "s/$source_str/$target_str/g" $base_path/$ip_host/public/java/$file_name
elif [ "$type_" = "ui" ]
then
sed -i "s/$source_str/$target_str/g" $base_path/$ip_host/ui/$file_name
elif [ "$type_" = "python" ]
then
sed -i "s/$source_str/$target_str/g" $base_path/$ip_host/python/$file_name
elif [ "$type_" = "node" ]
then
sed -i "s/$source_str/$target_str/g" $base_path/$ip_host/node/$file_name
fi
}
tranceConfig java "pay.debug=0" "pay.debug=1" "192.168.4.13" "xyqb-mall.properties"
tranceConfig java "pay.debug=0" "pay.debug=1" "192.168.4.151" "xyqb-mall.properties"
tranceConfig java "pay.debug=0" "pay.debug=1" "192.168.4.152" "xyqb-mall.properties"
tranceConfig java "192.168.4.3" "192.168.4.17" "192.168.4.17" "*"
tranceConfig java "sms.is.debug=1" "sms.is.debug=0" "192.168.4.24" "xyqb.properties"
tranceConfig java "sms.is.debug=1" "sms.is.debug=0" "192.168.4.24" "di-ting.properties"
tranceConfig java "xyqb.is.debug=1" "xyqb.is.debug=0" "192.168.4.24" "xyqb.properties"
tranceConfig node "192.168.4.3" "192.168.4.107" "192.168.4.12" "AppBackend.js"
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