el id de transaccion es el mismo del archivo

This commit is contained in:
f 2022-03-03 14:53:01 -03:00
parent 623dccb301
commit 6105e5948e

View file

@ -43,7 +43,7 @@ uuid="$(uuidgen)"
timestamp="$(date +%s)"
json="{\"transaction_uuid\":\"$uuid\",\"controller_id\":\"$name\",\"timestamp\":\"$timestamp\",\"error_code\":\"10\",\"coordinates\":{\"lat\":1,\"lng\":1},\"battery_status\":\"98\",\"sample\":\"0\",\"storage\":\"uso del almacenamiento\",\"arduinos\":[$sensores]}"
touch $install_dir/lock
file=$(date +%Y%m%d%H%M%S)-$(uuidgen)
file=$(date +%Y%m%d%H%M%S)-$uuid
for ((i=1 ; i <=3 ; i++));do
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