Skip to content

Commit

Permalink
Update menu.sh
Browse files Browse the repository at this point in the history
will need to update auto restart to make it work with multiple printers
  • Loading branch information
T9Air committed Dec 1, 2024
1 parent c6a44d4 commit 2260995
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Interface_scripts/menu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ clear

kpr="/home/$USER/Klipper_Power_Resume"

if [ $1 == "restart" ]; then
# Check if the last print was finished or not
finished1=$(sed -n '1p' /home/$USER/printer_data/config/kpr-config/static_log.txt)
finished2=$(sed -n '2p' /home/$USER/printer_data/config/kpr-config/static_log.txt)
# if [ $1 == "restart" ]; then
# # Check if the last print was finished or not
# finished1=$(sed -n '1p' /home/$USER/printer_data/config/kpr-config/static_log.txt)
# finished2=$(sed -n '2p' /home/$USER/printer_data/config/kpr-config/static_log.txt)

if ! [[ $finished1 == "Finished" || $finished2 == "Finished" ]]; then
read -r -p "Do you want to restart your last print? (Y/n) " restart
# if ! [[ $finished1 == "Finished" || $finished2 == "Finished" ]]; then
# read -r -p "Do you want to restart your last print? (Y/n) " restart

if [[ "$restart" == [Yy] ]]; then
$kpr/Interface_scripts/restart_file.sh
fi
echo "Finished" >> /home/$USER/printer_data/kpr-config/static_log.txt
fi
fi
# if [[ "$restart" == [Yy] ]]; then
# $kpr/Interface_scripts/restart_file.sh
# fi
# echo "Finished" >> /home/$USER/printer_data/kpr-config/static_log.txt
# fi
# fi

# Get currently selected printer
selected_printer=""
Expand Down

0 comments on commit 2260995

Please sign in to comment.