Move sip local restore to spp script

This commit is contained in:
Bob Mottram 2016-07-08 16:06:34 +01:00
parent 79ca882147
commit 6754e540fd
2 changed files with 23 additions and 23 deletions

View File

@ -57,10 +57,33 @@ function backup_local_sip {
fi fi
} }
function restore_local_sip {
if [ -d $USB_MOUNT/backup/sip ]; then
echo $"Restoring SIP settings"
temp_restore_dir=/root/tempsip
function_check restore_directory_from_usb
restore_directory_from_usb $temp_restore_dir sip
cp -f $temp_restore_dir/home/$ADMIN_USERNAME/tempbackup/sipwitch.conf /etc/sipwitch.conf
if [ ! "$?" = "0" ]; then
rm -rf $temp_restore_dir
function_check set_user_permissions
set_user_permissions
backup_unmount_drive
exit 3679
fi
rm -rf $temp_restore_dir
service sipwitch restart
fi
}
function backup_remote_sip { function backup_remote_sip {
echo -n '' echo -n ''
} }
function restore_remote_sip {
echo -n ''
}
function remove_sip { function remove_sip {
if ! grep -Fxq "install_sip" $COMPLETION_FILE; then if ! grep -Fxq "install_sip" $COMPLETION_FILE; then
return return

View File

@ -1228,28 +1228,6 @@ function restore_voip {
fi fi
} }
function restore_sip {
if [[ $RESTORE_APP != 'all' ]]; then
if [[ $RESTORE_APP != 'sip' ]]; then
return
fi
fi
if [ -d $USB_MOUNT/backup/sip ]; then
echo $"Restoring SIP settings"
temp_restore_dir=/root/tempsip
restore_directory_from_usb $temp_restore_dir sip
cp -f $temp_restore_dir/home/$ADMIN_USERNAME/tempbackup/sipwitch.conf /etc/sipwitch.conf
if [ ! "$?" = "0" ]; then
rm -rf $temp_restore_dir
set_user_permissions
backup_unmount_drive
exit 3679
fi
rm -rf $temp_restore_dir
service sipwitch restart
fi
}
function restore_tox { function restore_tox {
if [[ $RESTORE_APP != 'all' ]]; then if [[ $RESTORE_APP != 'all' ]]; then
if [[ $RESTORE_APP != 'tox' ]]; then if [[ $RESTORE_APP != 'tox' ]]; then
@ -1344,7 +1322,6 @@ restore_cjdns
restore_email restore_email
restore_dlna restore_dlna
restore_voip restore_voip
restore_sip
restore_tox restore_tox
restore_apps restore_apps