restore configs

This commit is contained in:
pvizeli 2017-03-24 16:34:44 +01:00
parent 634956ff45
commit 13cf51f7cb

View File

@ -326,6 +326,10 @@ if [ $RESINHUP_EXIT -eq 0 ] || [ $RESINHUP_EXIT -eq 2 ] || [ $RESINHUP_EXIT -eq
RESINHUP_ENDTIME=$(date +%s)
log "Update suceeded in $(($RESINHUP_ENDTIME - $RESINHUP_STARTTIME)) seconds."
# Restore config
cp /mnt/boot/config.json.hup.old /mnt/boot/config.json || true
cp /mnt/boot/system-connections/resin-sample.hup.old /mnt/boot/config.json || true
# Everything is fine - Reboot
if [ "$NOREBOOT" == "no" ]; then
log "Rebooting board in 5 seconds..."