Avoid getting stuck with old backups

This commit is contained in:
Bob Mottram 2016-10-31 17:30:24 +00:00
parent 557b25b4a8
commit b90ce42209
2 changed files with 6 additions and 6 deletions

View File

@ -93,10 +93,10 @@ function restore_local_dokuwiki {
DOKUWIKI_DOMAIN_NAME=$(get_completion_param "dokuwiki domain")
temp_restore_dir=/root/tempdokuwiki
function_check restore_directory_from_usb
if [ -d ${USB_MOUNT}/backup/wiki ]; then
restore_directory_from_usb ${temp_restore_dir} wiki
else
if [ -d ${USB_MOUNT}/backup/dokuwiki ]; then
restore_directory_from_usb ${temp_restore_dir} dokuwiki
else
restore_directory_from_usb ${temp_restore_dir} wiki
fi
cp -r ${temp_restore_dir}/var/lib/dokuwiki/* /var/lib/dokuwiki/
if [ ! "$?" = "0" ]; then

View File

@ -226,10 +226,10 @@ function restore_local_htmly {
if [ $HTMLY_DOMAIN_NAME ]; then
echo $"Restoring htmly installation"
temp_restore_dir=/root/temphtmly
if [ -d $USB_MOUNT/backup/blog ]; then
restore_directory_from_usb $temp_restore_dir blog
else
if [ -d $USB_MOUNT/backup/htmly ]; then
restore_directory_from_usb $temp_restore_dir htmly
else
restore_directory_from_usb $temp_restore_dir blog
fi
if [ -d /var/www/${HTMLY_DOMAIN_NAME}/htdocs ]; then
rm -rf /var/www/${HTMLY_DOMAIN_NAME}/htdocs