Skip to content

Instantly share code, notes, and snippets.

@crizstian
Created April 12, 2019 18:53
Show Gist options
  • Save crizstian/9e8805067438dfb30945b452931f8471 to your computer and use it in GitHub Desktop.
Save crizstian/9e8805067438dfb30945b452931f8471 to your computer and use it in GitHub Desktop.
consul-template -template "/var/mongo/admin.js.ctmpl:/var/mongo/admin.js" -once
consul-template -template "/var/mongo/grantRole.js.ctmpl:/var/mongo/grantRole.js" -once
consul-template -template "/var/mongo/replica.js.ctmpl:/var/mongo/replica.js" -once
cat > /var/mongo/hosts.sh <<EOF
. /etc/environment
function howManyServers {
arg=''
arg=\$arg' --add-host '\$DB1':'\$DB1
arg=\$arg' --add-host '\$DB2':'\$DB2
arg=\$arg' --add-host '\$DB3':'\$DB3
echo \$arg
}
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment