CC-5708: proftpd hook for new File API

variable escaping?
This commit is contained in:
drigato 2014-03-27 16:48:27 -04:00
parent 2bc37b9fea
commit cc4e43a8b5

View file

@ -5,7 +5,7 @@ post_file() {
max_retry=360
retry_count=0
file_path=$1
file_path=${1}
filename="${file_path##*/}"
#base_instance_path and airtime_conf_path are common to all saas instances
@ -28,7 +28,7 @@ post_file() {
api_key=$(sudo awk -F "=" '/api_key/ {print $2}' $instance_conf_path)
until curl --max-time 30 $url -u $api_key":" -X POST -F "file=@$file_path" -F "name=$filename"
until curl --max-time 30 $url -u $api_key":" -X POST -F "file=@${file_path}" -F "name=${filename}"
do
retry_count=$[$retry_count+1]
if [ $retry_count -ge $max_retry ]; then
@ -38,4 +38,4 @@ post_file() {
done
}
post_file "$1" &
post_file "${1}" &