Move remote dlna restore to app script

This commit is contained in:
Bob Mottram 2016-07-10 14:56:02 +01:00
parent 81d4fab283
commit 9610be58d2
2 changed files with 14 additions and 3 deletions

View File

@ -99,7 +99,20 @@ function backup_remote_dlna {
}
function restore_remote_dlna {
echo -n ''
if [ -d /var/cache/minidlna ]; then
if [ -d $SERVER_DIRECTORY/backup/dlna ]; then
echo $"Restoring DLNA cache"
temp_restore_dir=/root/tempdlna
function_check restore_directory_from_friend
restore_directory_from_friend $temp_restore_dir dlna
cp -r $temp_restore_dir/var/cache/minidlna/* /var/cache/minidlna/
if [ ! "$?" = "0" ]; then
exit 982
fi
rm -rf $temp_restore_dir
echo $"Restore of DLNA complete"
fi
fi
}
function remove_dlna {

View File

@ -739,8 +739,6 @@ restore_mailing_list
restore_email
#restore_apps remote
restore_dlna
echo $"*** Remote restore was successful ***"
exit 0