Essa é uma revisão anterior do documento!
echo baixando/instalando os pacotes/arquivos necessarios #apt install python3-serial jq git apt install python3-serial git git clone https://github.com/ccwienk/temper.git
#temperatura=$( /opt/temper/temper.py --json | jq --raw-output '.[] ."internal temperature"' ) temperatura=$( /opt/temper/temper.py | awk '{print $7}' | sed 's/C//' ) echo $temperatura maximo=26.0 teste=$(echo "$temperatura < $maximo" | bc) if [ $teste = '1' ]; then echo "temperature $temperaturaºC is smaller than $maximoºC"; else echo 'Alert! Temperature $temperaturaºC is biggest than $maximoºC'; echo "Enviando email..." set smtp=smtps://smtp.grude.ufmg.br:465 set from="sddr@icb.ufmg.br" set smtp-auth-user=icb-smtp set smtp-auth-password=SENHANOWIKI set smtp-auth=login set smtp-verify=ignore echo "Temperatura: $temperatura" | /bin/mailx -v -s "[SDDR] Temperatura acima de $maximo graus" gti@icb.ufmg.br echo "Temperatura: $temperatura" | /bin/mailx -v -s "[SDDR] Temperatura acima de $maximo graus" miguel@icb.ufmg.br echo "Enviado com sucesso" fi;
...
...