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
fi fi
if [ -f $temp_restore_dir$NODEJS_INSTALLED_APPS_FILE ]; then #if [ -f $temp_restore_dir$NODEJS_INSTALLED_APPS_FILE ]; then
cp -f $temp_restore_dir$NODEJS_INSTALLED_APPS_FILE $NODEJS_INSTALLED_APPS_FILE # cp -f $temp_restore_dir$NODEJS_INSTALLED_APPS_FILE $NODEJS_INSTALLED_APPS_FILE
fi #fi
if [ -f $temp_restore_dir/root/${PROJECT_NAME}.cfg ]; then #if [ -f $temp_restore_dir/root/${PROJECT_NAME}.cfg ]; then
cp -f $temp_restore_dir/root/${PROJECT_NAME}.cfg $CONFIGURATION_FILE # cp -f $temp_restore_dir/root/${PROJECT_NAME}.cfg $CONFIGURATION_FILE
if [ ! "$?" = "0" ]; then # if [ ! "$?" = "0" ]; then
set_user_permissions # set_user_permissions
backup_unmount_drive # backup_unmount_drive
rm -rf $temp_restore_dir # rm -rf $temp_restore_dir
exit 5294 # exit 5294
fi # fi
fi #fi
if [ -f $CONFIGURATION_FILE ]; then #if [ -f $CONFIGURATION_FILE ]; then
# install according to the config file # # install according to the config file
freedombone -c $CONFIGURATION_FILE # freedombone -c $CONFIGURATION_FILE
fi #fi
if [ -f $temp_restore_dir/root/${PROJECT_NAME}-completed.txt ]; then #if [ -f $temp_restore_dir/root/${PROJECT_NAME}-completed.txt ]; then
cp -f $temp_restore_dir/root/${PROJECT_NAME}-completed.txt $COMPLETION_FILE # cp -f $temp_restore_dir/root/${PROJECT_NAME}-completed.txt $COMPLETION_FILE
if [ ! "$?" = "0" ]; then # if [ ! "$?" = "0" ]; then
set_user_permissions # set_user_permissions
backup_unmount_drive # backup_unmount_drive
rm -rf $temp_restore_dir # rm -rf $temp_restore_dir
exit 6382 # exit 6382
fi # fi
fi #fi
if [ -f ${temp_restore_dir}${BACKUP_EXTRA_DIRECTORIES} ]; then if [ -f ${temp_restore_dir}${BACKUP_EXTRA_DIRECTORIES} ]; then
cp -f ${temp_restore_dir}${BACKUP_EXTRA_DIRECTORIES} ${BACKUP_EXTRA_DIRECTORIES} cp -f ${temp_restore_dir}${BACKUP_EXTRA_DIRECTORIES} ${BACKUP_EXTRA_DIRECTORIES}

View File

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