Skip to content

Instantly share code, notes, and snippets.

@divideby0
Created January 29, 2015 22:05
Show Gist options
  • Save divideby0/34ecf33f1dfbb04dd48c to your computer and use it in GitHub Desktop.
Save divideby0/34ecf33f1dfbb04dd48c to your computer and use it in GitHub Desktop.
#!/bin/bash
IP=`ifconfig en0 inet | grep inet | sed 's/.*inet *//; s/ .*//'`
CN="${IP##*.}"
sed -i "s/node.name: .*/node.name: es-${CN}/" /etc/elasticsearch/elasticsearch.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment