redis-upload-local.sh 542 B

123456789101112131415161718
  1. #!/bin/bash
  2. git pull
  3. #redis-cli -h empire -n 7 -x SET httpscanvasinstructurecom-32990000000000049 < httpscanvasinstructurecom-32990000000000049.json
  4. #redis-cli -h empire -n 7 EXPIRE httpscanvasinstructurecom-32990000000000049 60 > /dev/null 2&>1
  5. redishost=empire
  6. redisdb=7
  7. redistimeout=600
  8. for file in *\.json; do
  9. f=$(echo "$file" | cut -f 1 -d '.')
  10. redis-cli -h $redishost -n $redisdb -x SET $f < $file > /dev/null 2>&1
  11. redis-cli -h $redishost -n $redisdb EXPIRE $f $redistimeout > /dev/null 2>&1
  12. echo "Uploaded $f";
  13. done