CC-5708: proftpd hook for new File API
small fix for testing script
This commit is contained in:
parent
49996a9986
commit
82958a10ae
1 changed files with 3 additions and 3 deletions
|
@ -1,14 +1,14 @@
|
|||
#! /bin/bash
|
||||
|
||||
post_file() {
|
||||
file_path=$1
|
||||
file_path=${1}
|
||||
filename="${file_path##*/}"
|
||||
|
||||
#kill process after 30 minutes (360*5=30 minutes)
|
||||
max_retry=10
|
||||
retry_count=0
|
||||
|
||||
until curl --max-time 30 http://localhost/rest/media -u 3TQY7JASUNVZ8IGOZQXJ: -X POST -F "file=@${file_path}" -F "name=${filename}"
|
||||
until curl --max-time 30 http://localhost/rest/media -u 3188BDIMPJROQP89Z0OX: -X POST -F "file=@${file_path}" -F "name=${filename}"
|
||||
do
|
||||
retry_count=$[$retry_count+1]
|
||||
if [ $retry_count -ge $max_retry ]; then
|
||||
|
@ -18,4 +18,4 @@ post_file() {
|
|||
done
|
||||
}
|
||||
|
||||
post_file "$1" &
|
||||
post_file "${1}" &
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue