add: support for new dwc-for-klipper-socket by @Stephan3

This will replace the previous installer for dwc2-for-klipper without substitution. dwc2-for-klipper won't be maintained anymore.
This commit is contained in:
th33xitus
2020-09-12 09:31:40 +02:00
parent d0ac497a60
commit 9bfce238d7
6 changed files with 106 additions and 164 deletions

View File

@@ -71,15 +71,16 @@ backup_klipper(){
}
backup_dwc2(){
if [ -d $DWC2FK_DIR ] && [ -d $DWC2_DIR ]; then
if [ -d $DWC2FK_DIR ] && [ -d $DWC_ENV_DIR ] && [ -d $DWC2_DIR ]; then
status_msg "Creating DWC2 Web UI backup ..."
check_for_backup_dir
get_date
status_msg "Timestamp: $current_date"
mkdir -p $BACKUP_DIR/dwc2-backups/"$current_date"
cp -r $DWC2FK_DIR $_ && cp -r $DWC2_DIR $_ && ok_msg "Backup complete!"
cp -r $DWC2FK_DIR $_ && cp -r $DWC_ENV_DIR $_ && cp -r $DWC2_DIR $_
ok_msg "Backup complete!"
else
ERROR_MSG=" Can't backup dwc2-for-klipper and/or dwc2 directory!\n Not found!"
ERROR_MSG=" Can't backup dwc2-for-klipper-socket and/or dwc2 directory!\n Not found!"
fi
}