#!/bin/bash

wget -q $1MQTT_update.sh

if [ $? = 0 ] ; then
	mv MQTT_update.sh.1 MQTT_update.sh
	echo "$(date +"%F %H:%M:%S,%3N") - script_update.sh - MQTT_update.sh downloaded succesfully" >> /var/log/realtime.log
else
	echo "$(date +"%F %H:%M:%S,%3N") - script_update.sh - MQTT_update.sh not downloaded with reason code <$?>" >> /var/log/realtime.log
fi
