From 5075019288789c8f1ada23abc8032d0dcdf0ce2b Mon Sep 17 00:00:00 2001 From: Milan Perera Date: Wed, 9 Aug 2017 11:36:52 +0530 Subject: [PATCH] Modified change-ip script Change analytics and broker's ip/domain through carbon.xml --- modules/scripts/change-ip.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/scripts/change-ip.sh b/modules/scripts/change-ip.sh index 49cbd183..87a84c12 100644 --- a/modules/scripts/change-ip.sh +++ b/modules/scripts/change-ip.sh @@ -6,7 +6,7 @@ echo "WSO2 IoT Server IP configuration tool" echo "----------------------------------------" -##################################### IP configs related to broker #################################### +##################################### IP configs related to core #################################### echo "" echo ">>> Step 1: Change current IP address of the IoT Core" @@ -202,6 +202,11 @@ echo "Changing /bin/iot-server.sh" sed -i -e 's/-Dmqtt.broker.host.*/-Dmqtt.broker.host="'$val4'" \\/' ../bin/iot-server.sh echo "Completed!!" +echo "Changing /wso2/broker/conf/carbon.xml" +sed -i '' -e 's#\(\)'$val3'\(\)#\1'$val4'\2#g' ../wso2/broker/conf/carbon.xml +sed -i '' -e 's#\(\)'$val3'\(\)#\1'$val4'\2#g' ../wso2/broker/conf/carbon.xml +echo "Completed!!" + @@ -246,6 +251,11 @@ sed -i -e 's/"acs.*/\"acs\"\:\"https\:\/\/'$val6':9445\/portal\/acs\"\,/' ../wso sed -i -e 's/"callbackUrl.*/\"callbackUrl\"\:\"https\:\/\/'$val6':9445\/portal\"\,/' ../wso2/analytics/repository/deployment/server/jaggeryapps/portal/configs/designer.json echo "Completed!!" +echo "Changing /wso2/analytics/conf/carbon.xml" +sed -i '' -e 's#\(\)'$val5'\(\)#\1'$val6'\2#g' ../wso2/analytics/conf/carbon.xml +sed -i '' -e 's#\(\)'$val5'\(\)#\1'$val6'\2#g' ../wso2/analytics/conf/carbon.xml +echo "Completed!!" + echo "" echo "--------------------------------------------" echo "Generating SSL certificates for the profiles"