redis-cluster.sh 378 B

1234567891011121314151617181920212223
  1. #!/bin/sh
  2. (cd 7000 && redis-server redis.conf) &
  3. PID1="$!"
  4. (cd 7001 && redis-server redis.conf) &
  5. PID2="$!"
  6. (cd 7002 && redis-server redis.conf) &
  7. PID3="$!"
  8. (cd 7003 && redis-server redis.conf) &
  9. PID4="$!"
  10. (cd 7004 && redis-server redis.conf) &
  11. PID5="$!"
  12. (cd 7005 && redis-server redis.conf) &
  13. PID6="$!"
  14. trap "kill $PID1 $PID2 $PID3 $PID4 $PID5 $PID6" exit INT TERM
  15. wait