mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-14 11:04:29 +05:00
fix(backups): add backup function for OctoEverywhere
fix #380 Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -191,3 +191,19 @@ function backup_telegram_bot() {
|
|||||||
print_error "Can't back up MoonrakerTelegramBot directory!\n Not found!"
|
print_error "Can't back up MoonrakerTelegramBot directory!\n Not found!"
|
||||||
fi
|
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
|
||||||
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ function backup_ui() {
|
|||||||
echo -e "| | |"
|
echo -e "| | |"
|
||||||
echo -e "| Klipper Webinterface: | Other: |"
|
echo -e "| Klipper Webinterface: | Other: |"
|
||||||
echo -e "| 5) [Mainsail] | 9) [Telegram Bot] |"
|
echo -e "| 5) [Mainsail] | 9) [Telegram Bot] |"
|
||||||
echo -e "| 6) [Fluidd] | |"
|
echo -e "| 6) [Fluidd] | 10) [OctoEverywhere] |"
|
||||||
back_footer
|
back_footer
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,6 +54,8 @@ function backup_menu() {
|
|||||||
do_action "backup_octoprint" "backup_ui";;
|
do_action "backup_octoprint" "backup_ui";;
|
||||||
9)
|
9)
|
||||||
do_action "backup_telegram_bot" "backup_ui";;
|
do_action "backup_telegram_bot" "backup_ui";;
|
||||||
|
10)
|
||||||
|
do_action "backup_octoeverywhere" "backup_ui";;
|
||||||
B|b)
|
B|b)
|
||||||
clear; main_menu; break;;
|
clear; main_menu; break;;
|
||||||
*)
|
*)
|
||||||
|
|||||||
Reference in New Issue
Block a user