Don't restore completion file

This could cause problems with upgrades
This commit is contained in:
Bob Mottram 2017-06-26 11:27:37 +01:00
parent 06e4db6145
commit d742ea58f8
2 changed files with 48 additions and 48 deletions

View File

@ -154,34 +154,34 @@ function restore_configfiles {
fi
fi
if [ -f $temp_restore_dir$NODEJS_INSTALLED_APPS_FILE ]; then
cp -f $temp_restore_dir$NODEJS_INSTALLED_APPS_FILE $NODEJS_INSTALLED_APPS_FILE
fi
#if [ -f $temp_restore_dir$NODEJS_INSTALLED_APPS_FILE ]; then
# cp -f $temp_restore_dir$NODEJS_INSTALLED_APPS_FILE $NODEJS_INSTALLED_APPS_FILE
#fi
if [ -f $temp_restore_dir/root/${PROJECT_NAME}.cfg ]; then
cp -f $temp_restore_dir/root/${PROJECT_NAME}.cfg $CONFIGURATION_FILE
if [ ! "$?" = "0" ]; then
set_user_permissions
backup_unmount_drive
rm -rf $temp_restore_dir
exit 5294
fi
fi
#if [ -f $temp_restore_dir/root/${PROJECT_NAME}.cfg ]; then
# cp -f $temp_restore_dir/root/${PROJECT_NAME}.cfg $CONFIGURATION_FILE
# if [ ! "$?" = "0" ]; then
# set_user_permissions
# backup_unmount_drive
# rm -rf $temp_restore_dir
# exit 5294
# fi
#fi
if [ -f $CONFIGURATION_FILE ]; then
# install according to the config file
freedombone -c $CONFIGURATION_FILE
fi
#if [ -f $CONFIGURATION_FILE ]; then
# # install according to the config file
# freedombone -c $CONFIGURATION_FILE
#fi
if [ -f $temp_restore_dir/root/${PROJECT_NAME}-completed.txt ]; then
cp -f $temp_restore_dir/root/${PROJECT_NAME}-completed.txt $COMPLETION_FILE
if [ ! "$?" = "0" ]; then
set_user_permissions
backup_unmount_drive
rm -rf $temp_restore_dir
exit 6382
fi
fi
#if [ -f $temp_restore_dir/root/${PROJECT_NAME}-completed.txt ]; then
# cp -f $temp_restore_dir/root/${PROJECT_NAME}-completed.txt $COMPLETION_FILE
# if [ ! "$?" = "0" ]; then
# set_user_permissions
# backup_unmount_drive
# rm -rf $temp_restore_dir
# exit 6382
# fi
#fi
if [ -f ${temp_restore_dir}${BACKUP_EXTRA_DIRECTORIES} ]; then
cp -f ${temp_restore_dir}${BACKUP_EXTRA_DIRECTORIES} ${BACKUP_EXTRA_DIRECTORIES}

View File

@ -144,32 +144,32 @@ function restore_configfiles {
fi
fi
if [ -f $temp_restore_dir$NODEJS_INSTALLED_APPS_FILE ]; then
cp -f $temp_restore_dir$NODEJS_INSTALLED_APPS_FILE $NODEJS_INSTALLED_APPS_FILE
fi
#if [ -f $temp_restore_dir$NODEJS_INSTALLED_APPS_FILE ]; then
# cp -f $temp_restore_dir$NODEJS_INSTALLED_APPS_FILE $NODEJS_INSTALLED_APPS_FILE
#fi
if [ -f $temp_restore_dir/root/${PROJECT_NAME}.cfg ]; then
cp -f $temp_restore_dir/root/${PROJECT_NAME}.cfg $CONFIGURATION_FILE
if [ ! "$?" = "0" ]; then
unmount_drive
rm -rf $temp_restore_dir
exit 5372
fi
fi
#if [ -f $temp_restore_dir/root/${PROJECT_NAME}.cfg ]; then
# cp -f $temp_restore_dir/root/${PROJECT_NAME}.cfg $CONFIGURATION_FILE
# if [ ! "$?" = "0" ]; then
# unmount_drive
# rm -rf $temp_restore_dir
# exit 5372
# fi
#fi
if [ -f $CONFIGURATION_FILE ]; then
# install according to the config file
freedombone -c $CONFIGURATION_FILE
fi
#if [ -f $CONFIGURATION_FILE ]; then
# # install according to the config file
# freedombone -c $CONFIGURATION_FILE
#fi
if [ -f $temp_restore_dir/root/${PROJECT_NAME}-completed.txt ]; then
cp -f $temp_restore_dir/root/${PROJECT_NAME}-completed.txt $COMPLETION_FILE
if [ ! "$?" = "0" ]; then
unmount_drive
rm -rf $temp_restore_dir
exit 7252
fi
fi
#if [ -f $temp_restore_dir/root/${PROJECT_NAME}-completed.txt ]; then
# cp -f $temp_restore_dir/root/${PROJECT_NAME}-completed.txt $COMPLETION_FILE
# if [ ! "$?" = "0" ]; then
# unmount_drive
# rm -rf $temp_restore_dir
# exit 7252
# fi
#fi
if [ -f ${temp_restore_dir}${BACKUP_EXTRA_DIRECTORIES} ]; then
cp -f ${temp_restore_dir}${BACKUP_EXTRA_DIRECTORIES} ${BACKUP_EXTRA_DIRECTORIES}