Restoring blog directory
This commit is contained in:
parent
a3ebf299cd
commit
58d1b6e16f
|
@ -228,14 +228,17 @@ function restore_local_htmly {
|
|||
temp_restore_dir=/root/temphtmly
|
||||
restore_directory_from_usb $temp_restore_dir blog
|
||||
restore_directory_from_usb $temp_restore_dir htmly
|
||||
if [ -d /var/www/${HTMLY_DOMAIN_NAME}/htdocs ]; then
|
||||
rm -rf /var/www/${HTMLY_DOMAIN_NAME}/htdocs
|
||||
cp -r $temp_restore_dir/var/www/${HTMLY_DOMAIN_NAME}/htdocs /var/www/${HTMLY_DOMAIN_NAME}/
|
||||
fi
|
||||
temp_source_dir=$(find ${temp_restore_dir} -name htdocs | sed 's/\.//g')
|
||||
cp -r ${temp_restore_dir}${temp_source_dir} /var/www/${HTMLY_DOMAIN_NAME}/
|
||||
if [ ! "$?" = "0" ]; then
|
||||
set_user_permissions
|
||||
backup_unmount_drive
|
||||
exit 593
|
||||
fi
|
||||
rm -rf $temp_restore_dir
|
||||
rm -rf ${temp_restore_dir}
|
||||
if [ ! -d /var/www/${HTMLY_DOMAIN_NAME}/htdocs/content ]; then
|
||||
echo $"No content directory found after restoring htmly"
|
||||
set_user_permissions
|
||||
|
@ -285,12 +288,15 @@ function restore_remote_htmly {
|
|||
mkdir $temp_restore_dir
|
||||
function_check restore_directory_from_friend
|
||||
restore_directory_from_friend $temp_restore_dir htmly
|
||||
if [ -d /var/www/${HTMLY_DOMAIN_NAME}/htdocs ]; then
|
||||
rm -rf /var/www/${HTMLY_DOMAIN_NAME}/htdocs
|
||||
cp -r $temp_restore_dir/var/www/${HTMLY_DOMAIN_NAME}/htdocs /var/www/${HTMLY_DOMAIN_NAME}/
|
||||
fi
|
||||
temp_source_dir=$(find ${temp_restore_dir} -name htdocs | sed 's/\.//g')
|
||||
cp -r ${temp_restore_dir}${temp_source_dir} /var/www/${HTMLY_DOMAIN_NAME}/
|
||||
if [ ! "$?" = "0" ]; then
|
||||
exit 593
|
||||
fi
|
||||
rm -rf $temp_restore_dir
|
||||
rm -rf ${temp_restore_dir}
|
||||
if [ ! -d /var/www/${HTMLY_DOMAIN_NAME}/htdocs/content ]; then
|
||||
echo $"No content directory found after restoring htmly"
|
||||
exit 287
|
||||
|
|
Loading…
Reference in New Issue