Skip to content

Instantly share code, notes, and snippets.

@brygom
Created November 15, 2018 02:15
Show Gist options
  • Save brygom/b6e14a17e719082eb4ee76e46e62a0a7 to your computer and use it in GitHub Desktop.
Save brygom/b6e14a17e719082eb4ee76e46e62a0a7 to your computer and use it in GitHub Desktop.
#! /bin/sh
mongo <<EOF
rs.initiate()
{{range $service := ls "/mongo"}}
rs.add('{{.}}:27017')
{{end}}
quit()
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment