update.sh.j2 323 B

123456789101112131415
  1. #!/bin/bash
  2. parallel=0
  3. path=$(realpath $(dirname $0))
  4. for i in /proc/sys/net/ipv4/conf/bat*; do
  5. ((parallel++))
  6. num=${i#*bat}
  7. python $path/main.py --server=148.251.101.196 --port=2003 --domain=domaene-${num} --batif=bat${num} &
  8. if ((parallel >= 16))
  9. then
  10. parallel=0
  11. wait
  12. fi
  13. done
  14. wait