From 6e4fe624ecdb369f52edaf22d7e16a7790475b2e Mon Sep 17 00:00:00 2001
From: Ross Simpson <ross@rosssimpson.com>
Date: Fri, 4 Oct 2019 22:01:44 +1000
Subject: [PATCH] Fix incorrect config filename in update script

The update script backs up the config file to `/root/config.bak`, but
then tries to restore it from `/root/config.yml.bak` (which obviously
won't be found).

This looks like a typo in the backup command, so update that command to
use the same filename as the restore command.

Signed-off-by: Ross Simpson <ross@rosssimpson.com>
---
 scripts/update_pwnagotchi.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/update_pwnagotchi.sh b/scripts/update_pwnagotchi.sh
index 734ed4c..9299f1a 100755
--- a/scripts/update_pwnagotchi.sh
+++ b/scripts/update_pwnagotchi.sh
@@ -89,7 +89,7 @@ fi
 
 if [ $BACKUPCONFIG -eq 1 ]; then
     echo "[+] Creating backup of config.yml and hostname references"
-    mv /root/pwnagotchi/config.yml /root/config.bak -f
+    mv /root/pwnagotchi/config.yml /root/config.yml.bak -f
     mv /etc/hosts /root/hosts.bak -f
     mv /etc/hostname /root/hostname.bak -f
     mv /etc/motd /etc/motd.bak -f