@@ -1644,9 +1644,9 @@ if [ -d /home/pi/configuration-files ]; then
16441644 mkdir -p /home/pi/candle/configuration-files-backup
16451645 fi
16461646
1647- cp -r /home/pi/configuration-files/ /home/pi/candle/configuration-files-backup/
1647+ cp -r /home/pi/configuration-files/* /home/pi/candle/configuration-files-backup
16481648
1649- rsync -vr --inplace /home/pi/candle/configuration-files-backup/ /
1649+ rsync -vr --inplace /home/pi/candle/configuration-files-backup/* /
16501650
16511651 rm -rf /home/pi/configuration-files
16521652
@@ -1674,7 +1674,10 @@ fi
16741674
16751675# chmod +x /home/pi/candle_first_run.sh
16761676
1677-
1677+ if [ ! -f /home/pi/candle/early.sh ]; then
1678+ echo " ERROR, early.sh is missing?"
1679+ exit 1
1680+ fi
16781681
16791682# CHMOD THE NEW FILES
16801683chmod +x /home/pi/candle/early.sh
@@ -2001,11 +2004,20 @@ cd /home/pi
20012004if [ ! -f /etc/rc.local.bak ]; then
20022005 cp /etc/rc.local /etc/rc.local.bak
20032006fi
2004- if [ ! -f /home/pi/candle/early.sh.bak ]; then
2005- cp /home/pi/candle/early.sh /home/pi/candle/early.sh.bak
2006- fi
2007- if [ ! -f /etc/xdg/openbox/autostart.bak ]; then
2008- cp /etc/xdg/openbox/autostart /etc/xdg/openbox/autostart.bak
2007+ if [ -f /home/pi/candle/early.sh ]; then
2008+ if [ ! -f /home/pi/candle/early.sh.bak ]; then
2009+ cp /home/pi/candle/early.sh /home/pi/candle/early.sh.bak
2010+ fi
2011+ else
2012+ echo
2013+ echo " ERROR, early.sh does not exist!"
2014+ fi
2015+ if [ -f etc/xdg/openbox/autostart ]; then
2016+ if [ ! -f /etc/xdg/openbox/autostart.bak ]; then
2017+ cp /etc/xdg/openbox/autostart /etc/xdg/openbox/autostart.bak
2018+ fi
2019+ else
2020+ echo " ERROR, autostart does not exist"
20092021fi
20102022
20112023
20172029
20182030
20192031
2020-
20212032# CLEANUP
20222033
20232034echo
0 commit comments