Move rss local restore to app script

This commit is contained in:
Bob Mottram 2016-07-09 10:33:56 +01:00
parent 2b9df463b4
commit e2ad22bd2d
2 changed files with 23 additions and 18 deletions

View File

@ -97,10 +97,33 @@ function backup_local_rss {
fi
}
function restore_local_rss {
if ! grep -q "RSS reader domain" $COMPLETION_FILE; then
return
fi
RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "RSS reader domain" | awk -F ':' '{print $2}')
if [ $RSS_READER_DOMAIN_NAME ]; then
echo $"Restoring ttrss"
temp_restore_dir=/root/tempttrss
restore_database ttrss ${RSS_READER_DOMAIN_NAME}
if [ -d $USB_MOUNT/backup/ttrss ]; then
chown -R www-data:www-data /etc/share/tt-rss
if [ -d $temp_restore_dir ]; then
rm -rf $temp_restore_dir
fi
fi
echo $"Restore of ttrss complete"
fi
}
function backup_remote_rss {
echo -n ''
}
function restore_remote_rss {
echo -n ''
}
function remove_rss {
if ! grep -Fxq "install_rss" $COMPLETION_FILE; then
return

View File

@ -840,23 +840,6 @@ function restore_gnusocial {
fi
}
function restore_rss {
if [[ $RESTORE_APP != 'all' ]]; then
if [[ $RESTORE_APP != 'ttrss' ]]; then
return
fi
fi
if [ $RSS_READER_DOMAIN_NAME ]; then
restore_database ttrss ${RSS_READER_DOMAIN_NAME}
if [ -d $USB_MOUNT/backup/ttrss ]; then
chown -R www-data:www-data /etc/share/tt-rss
if [ -d /root/tempttrss ]; then
rm -rf /root/tempttrss
fi
fi
fi
}
function restore_hubzilla {
if [[ $RESTORE_APP != 'all' ]]; then
if [[ $RESTORE_APP != 'hubzilla' ]]; then
@ -969,7 +952,6 @@ restore_ipfs
restore_xmpp
restore_gnusocial
restore_hubzilla
restore_rss
restore_email
restore_apps