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 -ex | |
# Stop the Riak node | |
service riak stop | |
# Change standard IP to the Riak node's eth0 IP | |
my_ip=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'` | |
sed -ire "s/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\"\, 8087/$my_ip\"\, 8087/g" /etc/riak/app.config | |
sed -ire "s/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\"\, 8098/$my_ip\"\, 8098/g" /etc/riak/app.config | |
sed -ire "s/\-name riak\@[0-9]*(\.[0-9]*){3}/\-name riak\@$my_ip/" /etc/riak/vm.args |