Skip to content

Commit

Permalink
check that the backup file exists before attempting to restore #105, …
Browse files Browse the repository at this point in the history
…format and lint and restore_data.sh
  • Loading branch information
Tylerjet committed Jul 16, 2024
1 parent ede9bba commit 1504707
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions utils/restore_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,14 @@ restoreBackupFiles() {
}

restoreMoonrakerDB() {
echo -e "Restore Moonraker Database"
bash "$HOME"/moonraker/scripts/restore-database.sh -i "$tempfolder"/database.backup
echo -e "Restore Moonraker Database"
if [ -f "$tempfolder/database.backup" ]; then
bash "$HOME"/moonraker/scripts/restore-database.sh -i "$tempfolder"/database.backup
fi
}

copyTheme() {
echo -e "Restore Theme"
echo -e "Restore Theme"
if [[ $theme_url ]]; then
cd "$HOME"/printer_data/config/
git clone $theme_url .theme
Expand Down

0 comments on commit 1504707

Please sign in to comment.