sh $work_dir/db_gen_config.sh $source_db_host$source_db_user$source_db_pwd$target_db_host$target_db_user$target_db_pwd$database$config_file_name$db_backup_sub_folders
echo"Step 2: replace domain name in tables: $database$mysql_host$db_backup_sub_folders"
sh $work_dir/db_replace_ip.sh $database$target_db_host$db_backup_sub_folders
echo"Step 2.1: is re_replace_ip: $re_replace_ip"
sh $work_dir/db_replace_ip.sh $database$target_db_host$db_backup_sub_folders$re_replace_ip$ip_last
echo"Step 3: import basic data from backup file: $database$mysql_host$db_backup_sub_folders"
sh $work_dir/db_import.sh $database$target_db_host$db_backup_sub_folders
sed-i"s/msg = json.loads(body, \"utf8\")/msg = json.loads(body, \"utf8\")\n if msg[\"source\"] not in white_list:\n logging.info(\"IP:%s不再白名单之列\", msg[\"source\"])\n if msg[\"phoneNo\"] not in phone_white_list:\n logging.info(\"Phone:%s不再白名单之列,短信中心禁止发送该条短信。\", msg[\"phoneNo\"])\n self.acknowledge_message(basic_deliver.delivery_tag)\n return/g"$project_path/server/mq/*.py
sed-i"s/msg = json.loads(body, \"utf8\")/msg = json.loads(body, \"utf8\")\n if msg[\"source\"] not in white_list:\n logging.info(\"IP:%s不再白名单之列,将检查手机号白名单\", msg[\"source\"])\n if msg[\"phoneNo\"] not in phone_white_list:\n logging.info(\"Phone:%s不再白名单之列,短信中心禁止发送该条短信。\", msg)\n self.acknowledge_message(basic_deliver.delivery_tag)\n return/g"$project_path/server/mq/*.py
# sed -i "s/target_host_name:7/${public_ip}:${ip_last_num}/g" $dir/public/java/*
# #gu-bei的回调接口都改成外网接口
# sed -i "s/callback=http:\/\/${IP_host_first}${ip_last_num}:7006/callback=http:\/\/${public_ip}:${ip_last_num}006/g" $dir/java/gu-bei.properties
# sed -i "s/pay_notify_url=http:\/\/${IP_host_first}${ip_last_num}:7006/pay_notify_url=http:\/\/${public_ip}:${ip_last_num}006/g" $dir/java/gu-bei.properties