Move remote mumble and sip backup to app script

This commit is contained in:
Bob Mottram 2016-07-09 21:58:58 +01:00
parent fa4a3a57ce
commit b0d9459743
3 changed files with 21 additions and 17 deletions

View File

@ -94,7 +94,16 @@ function restore_local_mumble {
}
function backup_remote_mumble {
echo -n ''
if [ -f /etc/mumble-server.ini ]; then
echo $"Backing up VoIP settings"
if [ ! -d /root/tempvoipbackup ]; then
mkdir -p /root/tempvoipbackup
fi
cp -f /etc/mumble-server.ini /root/tempvoipbackup
cp -f /var/lib/mumble-server/mumble-server.sqlite /root/tempvoipbackup
backup_directory_to_friend /root/tempvoipbackup voip
echo $"Backup of VoIP settings complete"
fi
}
function restore_remote_mumble {

View File

@ -38,7 +38,7 @@ VOIP_TURN_TLS_PORT=5349
VOIP_TURN_NONCE=
function reconfigure_sip {
echo -n ''
echo -n ''
}
function upgrade_sip {
@ -81,7 +81,16 @@ function restore_local_sip {
}
function backup_remote_sip {
echo -n ''
if [ -f /etc/sipwitch.conf ]; then
echo $"Backing up SIP settings"
temp_backup_dir=/root/tempsipbackup
if [ ! -d $temp_backup_dir ]; then
mkdir -p $temp_backup_dir
fi
cp -f /etc/sipwitch.conf $temp_backup_dir
backup_directory_to_friend $temp_backup_dir sip
echo $"Backup SIP settings complete"
fi
}
function restore_remote_sip {

View File

@ -276,19 +276,6 @@ function backup_admin_readme {
fi
}
function backup_voip {
if [ -f /etc/mumble-server.ini ]; then
echo $"Backing up VoIP settings"
if [ ! -d /root/tempvoipbackup ]; then
mkdir -p /root/tempvoipbackup
fi
cp -f /etc/mumble-server.ini /root/tempvoipbackup
cp -f /var/lib/mumble-server/mumble-server.sqlite /root/tempvoipbackup
cp -f /etc/sipwitch.conf /root/tempvoipbackup
backup_directory_to_friend /root/tempvoipbackup voip
fi
}
function backup_mariadb {
if [ ${#DATABASE_PASSWORD} -gt 1 ]; then
if [ ! -d /root/tempmariadb ]; then
@ -438,7 +425,6 @@ if [[ $TEST_MODE == "no" ]]; then
backup_certs
backup_mailing_list
backup_voip
backup_extra_directories
fi