Last active
December 13, 2015 21:38
-
-
Save nopolabs/4978447 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
DEV_DIR=riak-1.2.1/dev | |
for i in 1 2 3 4 | |
do | |
PORT_PREFIX=99${i} | |
APP_CONFIG=${DEV_DIR}/dev${i}/etc/app.config | |
cp $APP_CONFIG $APP_CONFIG.bak | |
perl -pi -e "s/(pb_port,)\s*\d+/\1 ${PORT_PREFIX}1/" $APP_CONFIG | |
perl -pi -e "s/(http,.*127.0.0.1.*,)\s*\d+/\1 ${PORT_PREFIX}2/" $APP_CONFIG | |
perl -pi -e "s/(https,.*127.0.0.1.*,)\s*\d+/\1 ${PORT_PREFIX}2/" $APP_CONFIG | |
perl -pi -e "s/(handoff_port,)\s*\d+/\1 ${PORT_PREFIX}3/" $APP_CONFIG | |
VM_ARGS=${DEV_DIR}/dev${i}/etc/vm.args | |
cp $VM_ARGS $VM_ARGS.bak | |
perl -pi -e "s/name riak\d*(\@127.0.0.1)/name riak${i}\1/" $VM_ARGS | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment