Move python_apps/airtime_analyzer/ to analyzer/

This commit is contained in:
jo 2021-10-17 02:31:27 +02:00 committed by Kyle Robbertze
parent a7d06ad076
commit 2ef63e8c4e
39 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,20 @@
#! /bin/bash
post_file() {
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 3188BDIMPJROQP89Z0OX: -X POST -F "file=@${file_path}" -F "name=${filename}"; do
retry_count=$((retry_count + 1))
if [ $retry_count -ge $max_retry ]; then
break
fi
sleep 1
done
}
post_file "${1}" &