From 9610be58d20fd15496753af1b4189f411d013ed4 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 10 Jul 2016 14:56:02 +0100 Subject: [PATCH] Move remote dlna restore to app script --- src/freedombone-app-dlna | 15 ++++++++++++++- src/freedombone-restore-remote | 2 -- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/freedombone-app-dlna b/src/freedombone-app-dlna index 59e7907e..734e663b 100755 --- a/src/freedombone-app-dlna +++ b/src/freedombone-app-dlna @@ -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 { diff --git a/src/freedombone-restore-remote b/src/freedombone-restore-remote index fe4fe78a..f3b8ffbe 100755 --- a/src/freedombone-restore-remote +++ b/src/freedombone-restore-remote @@ -739,8 +739,6 @@ restore_mailing_list restore_email #restore_apps remote -restore_dlna - echo $"*** Remote restore was successful ***" exit 0