mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-11-18 09:57:17 +01:00
fix import
This commit is contained in:
@@ -241,7 +241,7 @@ if [ "$1" = "import" ]; then
|
|||||||
|
|
||||||
isV2Migration=1
|
isV2Migration=1
|
||||||
# check if its a v2 migration if /mnt/hdd/temp/migration_extract/v2.migration.info exists
|
# check if its a v2 migration if /mnt/hdd/temp/migration_extract/v2.migration.info exists
|
||||||
if [ -f "/mnt/hdd/temp/migration_extract/v2.migration.info" ]; then
|
if [ -f "/mnt/hdd/temp/migration_extract/app-data/v2.migration.info" ]; then
|
||||||
migrationVersion=2
|
migrationVersion=2
|
||||||
fi
|
fi
|
||||||
echo "# Migration Version: ${migrationVersion}" >> ${logFile}
|
echo "# Migration Version: ${migrationVersion}" >> ${logFile}
|
||||||
@@ -256,11 +256,12 @@ if [ "$1" = "import" ]; then
|
|||||||
if [ "${migrationVersion}" == "2" ]; then
|
if [ "${migrationVersion}" == "2" ]; then
|
||||||
echo "# Detected v2 migration file ..." >> ${logFile}
|
echo "# Detected v2 migration file ..." >> ${logFile}
|
||||||
# Mit rsync übertragen und dabei symbolische Links erhalten
|
# Mit rsync übertragen und dabei symbolische Links erhalten
|
||||||
sudo rsync -avK /mnt/hdd/temp/migration_extract/mnt/hdd/ /mnt/hdd/app-data 2>>${logFile}
|
sudo rsync -avK /mnt/hdd/temp/migration_extract/app-data/ /mnt/hdd/app-data/ 2>>${logFile}
|
||||||
if [ "$?" != "0" ]; then
|
if [ "$?" != "0" ]; then
|
||||||
echo "error='migration rsync failed'"
|
echo "error='migration rsync failed'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
sudo rm /mnt/hdd/app-data/v2.migration.info
|
||||||
fi
|
fi
|
||||||
sudo rm -rf /mnt/hdd/temp/migration_extract
|
sudo rm -rf /mnt/hdd/temp/migration_extract
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user