Advertisement
Guest User

Untitled

a guest
Apr 5th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. wget -P /mnt/s3fs/media/ -rN --tries=0 --read-timeout=20 ‐‐continue ‐‐timestamping --user=xxxxx --password=yyyyy ftp://zzzzz.org/ &
  4. wget_pid=$!
  5. counter=0
  6. timeout=60
  7. while [[ -n $(ps -e) | grep "$wget_pid") && "$counter" -lt "$timeout" ]]
  8. do
  9. sleep 1
  10. counter=$(($counter+1))
  11. done
  12. if [[ -n $(ps -e) | grep "$wget_pid") ]]; then
  13. kill -s SIGKILL "$wget_pid"
  14. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement