createIndex.sh 281 B

123456789101112
  1. #!/bin/bash
  2. couchdbPeers=('192.168.64.5:30001')
  3. database='channel_cnsp'
  4. for couchdbPeer in ${couchdbPeers[@]}
  5. do
  6. for indexFile in ./indexes/*
  7. do
  8. curl -fX POST "http://$couchdbPeer/$database/_index" -H 'Content-Type: application/json' -d @$indexFile
  9. done
  10. done