From 13cf51f7cb38c7a660514e02c2dd37e1961d8abe Mon Sep 17 00:00:00 2001 From: pvizeli Date: Fri, 24 Mar 2017 16:34:44 +0100 Subject: [PATCH] restore configs --- meta-hassio/recipes-support/resinhup/resinhup/resinhup | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta-hassio/recipes-support/resinhup/resinhup/resinhup b/meta-hassio/recipes-support/resinhup/resinhup/resinhup index f1c3dd48f..c7ada27a1 100644 --- a/meta-hassio/recipes-support/resinhup/resinhup/resinhup +++ b/meta-hassio/recipes-support/resinhup/resinhup/resinhup @@ -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..."