Move remote xmpp restore to app script

This commit is contained in:
Bob Mottram 2016-07-10 13:13:05 +01:00
parent 5f34143c8b
commit 7b9e386455
2 changed files with 14 additions and 22 deletions

View File

@ -150,7 +150,20 @@ function backup_remote_xmpp {
} }
function restore_remote_xmpp { function restore_remote_xmpp {
echo -n '' if [ -d /var/lib/prosody ]; then
echo $"Restoring XMPP settings"
temp_restore_dir=/root/tempxmpp
function_check restore_directory_from_friend
restore_directory_from_friend $temp_restore_dir xmpp
cp -r $temp_restore_dir/var/lib/prosody/* /var/lib/prosody
if [ ! "$?" = "0" ]; then
exit 725
fi
rm -rf $temp_restore_dir
service prosody restart
chown -R prosody:prosody /var/lib/prosody/*
echo $"Restore of XMPP settings complete"
fi
} }
function configure_firewall_for_xmpp { function configure_firewall_for_xmpp {

View File

@ -666,26 +666,6 @@ function restore_mailing_list {
fi fi
} }
function restore_xmpp {
if [[ $RESTORE_APP != 'all' ]]; then
if [[ $RESTORE_APP != 'xmpp' ]]; then
return
fi
fi
if [ -d /var/lib/prosody ]; then
echo $"Restoring XMPP settings"
temp_restore_dir=/root/tempxmpp
restore_directory_from_friend $temp_restore_dir xmpp
cp -r $temp_restore_dir/var/lib/prosody/* /var/lib/prosody
if [ ! "$?" = "0" ]; then
exit 725
fi
rm -rf $temp_restore_dir
service prosody restart
chown -R prosody:prosody /var/lib/prosody/*
fi
}
function restore_gnusocial { function restore_gnusocial {
if [[ $RESTORE_APP != 'all' ]]; then if [[ $RESTORE_APP != 'all' ]]; then
if [[ $RESTORE_APP != 'gnusocial' ]]; then if [[ $RESTORE_APP != 'gnusocial' ]]; then
@ -1118,7 +1098,6 @@ restore_personal_settings
restore_mailing_list restore_mailing_list
restore_email restore_email
restore_xmpp
restore_gnusocial restore_gnusocial
restore_hubzilla restore_hubzilla
restore_rss restore_rss