Skip to content

Commit 9ef0705

Browse files
Update create_latest_candle.sh
1 parent 4091e4e commit 9ef0705

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

create_latest_candle.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ fi
307307

308308
echo
309309

310-
311310
# Clean up any files that may be left over to make sure there is enough space
312311
if [ -f /zero.fill ]; then
313312
rm /zero.fill
@@ -326,6 +325,10 @@ if [ -f /home/pi/latest_stable_controller.tar ]; then
326325
rm /home/pi/latest_stable_controller.tar
327326
echo "Warning, removed /home/pi/latest_stable_controller.tar"
328327
fi
328+
if [ -f /home/pi/latest_stable_controller.tar.txt ]; then
329+
rm /home/pi/latest_stable_controller.tar.txt
330+
echo "Warning, removed /home/pi/latest_stable_controller.tar.txt"
331+
fi
329332

330333

331334

@@ -645,9 +648,9 @@ if [[ -z "${SKIP_CONTROLLER_INSTALL}" ]] || [ "$SKIP_CONTROLLER_INSTALL" = no ];
645648
then
646649

647650
echo
648-
echo "INSTALLING CANDLE CONTROLLER"
649-
echo "Candle: starting installing of Candle controller itself" >> /dev/kmsg
650-
echo "Candle: starting installing of Candle controller itself" >> /boot/candle_log.txt
651+
echo "PRE-DOWNLOADING CANDLE CONTROLLER"
652+
echo "Candle: starting download of Candle controller" >> /dev/kmsg
653+
echo "Candle: starting download of Candle controller" >> /boot/candle_log.txt
651654
echo
652655

653656
cd /home/pi
@@ -658,7 +661,6 @@ then
658661

659662
if [ -f /boot/candle_cutting_edge.txt ]; then
660663
echo "Candle: Starting download of cutting edge controller install script" >> /dev/kmsg
661-
echo "Candle: Starting download of cutting edge controller install script" >> /boot/candle_log.txt
662664
wget https://raw.githubusercontent.com/createcandle/install-scripts/main/install_candle_controller.sh -O ./install_candle_controller.sh
663665

664666
else
@@ -712,10 +714,10 @@ then
712714
echo "Candle: Error, MD5 checksum of latest_stable_controller.tar did not match, bad download?" >> /boot/candle_log.txt
713715

714716
if [ -f /home/pi/latest_stable_controller.tar ]; then
715-
#rm /home/pi/latest_stable_controller.tar
717+
rm /home/pi/latest_stable_controller.tar
716718
fi
717719
if [ -f /home/pi/latest_stable_controller.tar.txt ]; then
718-
#rm /home/pi/latest_stable_controller.tar.txt
720+
rm /home/pi/latest_stable_controller.tar.txt
719721
fi
720722

721723
# Show error image
@@ -732,7 +734,7 @@ then
732734

733735
else
734736
echo "Candle: download of stable controller tar or md5 failed. Aborting."
735-
echo "Candle: download of stable controller tar or md5 failed. Aborting." >> /dev/kmsg
737+
echo "Candle: Error, download of stable controller tar or md5 failed. Aborting." >> /dev/kmsg
736738
echo "$(date) - download of stable controller tar or md5 failed. Aborting." >> /boot/candle_log.txt
737739

738740
if [ -f /home/pi/latest_stable_controller.tar ]; then
@@ -754,7 +756,6 @@ then
754756
exit 1
755757
fi
756758

757-
758759
fi
759760

760761

@@ -777,6 +778,7 @@ then
777778
fi
778779

779780
exit 1
781+
780782
fi
781783

782784
fi

0 commit comments

Comments
 (0)