Move remote rss restore to app script

This commit is contained in:
Bob Mottram 2016-07-10 14:07:31 +01:00
parent 908919e11d
commit f869db0ca0
2 changed files with 13 additions and 20 deletions

View File

@ -144,7 +144,19 @@ function backup_remote_rss {
}
function restore_remote_rss {
echo -n ''
if grep -q "RSS reader domain" $COMPLETION_FILE; then
echo $"Restoring ttrss"
RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "RSS reader domain" | awk -F ':' '{print $2}')
function_check restore_database_from_friend
restore_database_from_friend ttrss ${RSS_READER_DOMAIN_NAME}
if [ -d $SERVER_DIRECTORY/backup/ttrss ]; then
chown -R www-data:www-data /etc/share/tt-rss
fi
if [ -d /root/tempttrss ]; then
rm -rf /root/tempttrss
fi
echo $"Restore of ttrss complete"
fi
}
function remove_rss {

View File

@ -666,24 +666,6 @@ function restore_mailing_list {
fi
}
function restore_rss {
if [[ $RESTORE_APP != 'all' ]]; then
if [[ $RESTORE_APP != 'ttrss' ]]; then
return
fi
fi
if grep -q "RSS reader domain" $COMPLETION_FILE; then
RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "RSS reader domain" | awk -F ':' '{print $2}')
restore_database_from_friend ttrss ${RSS_READER_DOMAIN_NAME}
if [ -d $SERVER_DIRECTORY/backup/ttrss ]; then
chown -R www-data:www-data /etc/share/tt-rss
fi
if [ -d /root/tempttrss ]; then
rm -rf /root/tempttrss
fi
fi
}
function restore_syncthing {
if [[ $RESTORE_APP != 'all' ]]; then
if [[ $RESTORE_APP != 'syncthing' ]]; then
@ -1052,7 +1034,6 @@ restore_personal_settings
restore_mailing_list
restore_email
restore_rss
restore_syncthing
restore_mediagoblin
restore_gogs