Compare commits
No commits in common. "676b3628bb6a3a5ff39a9de8e8e9ab345d954055" and "8df59231a530cf96e27bd5d8e0e3eb71255b8456" have entirely different histories.
676b3628bb
...
8df59231a5
2 changed files with 4 additions and 5 deletions
|
@ -48,6 +48,6 @@ json="{\"transaction_uuid\":\"$uuid\",\"controller_id\":\"$name\",\"timestamp\":
|
|||
if echo $json | $json_linter >/dev/null 2>&1 ;then
|
||||
echo $json > $install_dir/stack/$file && rm $install_dir/lock && echo $((counter+1)) > $install_dir/counter && break
|
||||
else
|
||||
echo "$(date +%Y-%m-%d-%H:%M:%S) - No se pudo obtener información." >> $log && sleep 1
|
||||
echo "$(date +%Y-%m-%d-%H:%M:%S) - No se pudo obtener información." >> $install_dir/errors.log && sleep 1
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -13,17 +13,16 @@ for filename in $install_dir/stack/*;do
|
|||
done
|
||||
|
||||
while :;do
|
||||
[ -f $install_dir/lock ] && continue
|
||||
|
||||
ping -c 1 fsf.org > /dev/null 2>&1 || continue
|
||||
test_url="$(curl -s -X POST -o /dev/null -w "%{http_code}" $url)"
|
||||
if [ $test_url -eq 404 ];then
|
||||
echo "$(date +%Y-%m-%d-%H:%M:%S) - $url - $test_url" >> $log && sleep 300 && continue
|
||||
echo "$(date +%Y-%m-%d-%H:%M:%S) - $url - $test_url" >> $install_dir/errors.log && sleep 300 && continue
|
||||
fi
|
||||
[ -f $install_dir/lock ] && continue
|
||||
file=$(get_stack)
|
||||
[ -z $file ] && continue
|
||||
local_transaction_uuid=$(jq -r '."transaction_uuid"' $stack/$file)
|
||||
remote_transaction=$(curl -s --connect-timeout 0.9 --show-error -w "~%{http_code}" -X POST -H "Content-Type: application/json" -d @$stack/$file $url 2> $curl_err)
|
||||
remote_transaction=$(curl -s --connect-timeout 0,9 --show-error -w "~%{http_code}" -X POST -H "Content-Type: application/json" -d @$stack/$file $url 2> $curl_err)
|
||||
remote_response="$(echo $remote_transaction | cut -d '~' -f 1)"
|
||||
server_error="$(echo $remote_transaction | cut -d '~' -f 2)"
|
||||
if [ ${#remote_response} -eq 36 ];then
|
||||
|
|
Loading…
Reference in a new issue