fix(backups): add backup function for OctoEverywhere

fix #380

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
th33xitus
2023-08-30 19:42:32 +02:00
parent f45da66e9e
commit a50dce20de
2 changed files with 19 additions and 1 deletions

View File

@@ -191,3 +191,19 @@ function backup_telegram_bot() {
print_error "Can't back up MoonrakerTelegramBot directory!\n Not found!"
fi
}
function backup_octoeverywhere() {
local current_date
if [[ -d ${OCTOEVERYWHERE_DIR} ]] ; then
status_msg "Creating OctoEverywhere backup ..."
check_for_backup_dir
current_date=$(get_date)
status_msg "Timestamp: ${current_date}"
mkdir -p "${BACKUP_DIR}/OctoEverywhere-backups/${current_date}"
cp -r "${OCTOEVERYWHERE_DIR}" "${_}" && cp -r "${OCTOEVERYWHERE_ENV}" "${_}"
print_confirm "OctoEverywhere backup complete!"
else
print_error "Can't back up OctoEverywhere directory!\n Not found!"
fi
}

View File

@@ -25,7 +25,7 @@ function backup_ui() {
echo -e "| | |"
echo -e "| Klipper Webinterface: | Other: |"
echo -e "| 5) [Mainsail] | 9) [Telegram Bot] |"
echo -e "| 6) [Fluidd] | |"
echo -e "| 6) [Fluidd] | 10) [OctoEverywhere] |"
back_footer
}
@@ -54,6 +54,8 @@ function backup_menu() {
do_action "backup_octoprint" "backup_ui";;
9)
do_action "backup_telegram_bot" "backup_ui";;
10)
do_action "backup_octoeverywhere" "backup_ui";;
B|b)
clear; main_menu; break;;
*)