demo.sh 275 B

123456789101112131415
  1. #!/bin/sh
  2. gomake
  3. ./goto -http=:8081 -rpc=true &
  4. master_pid=$!
  5. sleep 1
  6. ./goto -master=127.0.0.1:8081 &
  7. slave_pid=$!
  8. echo "Running master on :8081, slave on :8080."
  9. echo "Visit: http://localhost:8080/add"
  10. echo "Press enter to shut down"
  11. read
  12. kill $master_pid
  13. kill $slave_pid