Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- wget -P /mnt/s3fs/media/ -rN --tries=0 --read-timeout=20 ‐‐continue ‐‐timestamping --user=xxxxx --password=yyyyy ftp://zzzzz.org/ &
- wget_pid=$!
- counter=0
- timeout=60
- while [[ -n $(ps -e) | grep "$wget_pid") && "$counter" -lt "$timeout" ]]
- do
- sleep 1
- counter=$(($counter+1))
- done
- if [[ -n $(ps -e) | grep "$wget_pid") ]]; then
- kill -s SIGKILL "$wget_pid"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement