Move remote cjdns restore to app script

This commit is contained in:
Bob Mottram 2016-07-10 14:49:16 +01:00
parent fdaef3d969
commit f4d4aeacfe
2 changed files with 13 additions and 22 deletions

View File

@ -42,7 +42,7 @@ CJDCMD_REPO="https://github.com/inhies/cjdcmd"
CJDCMD_COMMIT='973cca6ed0eecf9041c3403a40193c0b1291b808'
function reconfigure_cjdns {
echo -n ''
echo -n ''
}
function upgrade_cjdns {
@ -148,7 +148,18 @@ function backup_remote_cjdns {
}
function restore_remote_cjdns {
echo -n ''
if [ -d $SERVER_DIRECTORY/backup/cjdns ]; then
echo $"Restoring cjdns installation"
temp_restore_dir=/root/tempcjdns
function_check restore_directory_from_friend
restore_directory_from_friend $temp_restore_dir cjdns
rm -rf /etc/cjdns
cp -r $temp_restore_dir/etc/cjdns /etc/
if [ ! "$?" = "0" ]; then
exit 7438
fi
rm -rf $temp_restore_dir
fi
}
function remove_cjdns {

View File

@ -666,25 +666,6 @@ function restore_mailing_list {
fi
}
function restore_cjdns {
if [[ $RESTORE_APP != 'all' ]]; then
if [[ $RESTORE_APP != 'cjdns' ]]; then
return
fi
fi
if [ -d $SERVER_DIRECTORY/backup/cjdns ]; then
echo $"Restoring cjdns installation"
temp_restore_dir=/root/tempcjdns
restore_directory_from_friend $temp_restore_dir cjdns
rm -rf /etc/cjdns
cp -r $temp_restore_dir/etc/cjdns /etc/
if [ ! "$?" = "0" ]; then
exit 7438
fi
rm -rf $temp_restore_dir
fi
}
function restore_voip {
if [[ $RESTORE_APP != 'all' ]]; then
if [[ $RESTORE_APP != 'voip' ]]; then
@ -813,7 +794,6 @@ restore_mailing_list
restore_email
#restore_apps remote
restore_cjdns
restore_voip
restore_tox
restore_dlna