Created
April 12, 2019 18:53
-
-
Save crizstian/9e8805067438dfb30945b452931f8471 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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