function mock()
{
        mkdir -p /home/quant_group/di-ting/config
        if [[ -a /home/quant_group/di-ting/config/application.properties ]]; then
                sed -i "/hubei.api.url/d" /home/quant_group/di-ting/config/application.properties
        fi
        echo "hubei.api.url=http://192.168.4.251:8585/Gateway/servlet/OutsiteReqServlet" >> /home/quant_group/di-ting/config/application.properties
        /home/qa-deploy-utils/qa_shell_script/5_restart_by_name.sh di-ting
}

function unmock()
{
	if [[ -a /home/quant_group/di-ting/config/application.properties ]]; then
                sed -i "/hubei.api.url/d" /home/quant_group/di-ting/config/application.properties
	fi
	/home/qa-deploy-utils/qa_shell_script/5_restart_by_name.sh di-ting
}

if [[ $1 = "yes" ]]; then
	mock
else
	unmock
fi
