Browse Source

Move remote mumble and sip backup to app script

Bob Mottram 8 years ago
parent
commit
b0d9459743
3 changed files with 21 additions and 17 deletions
  1. 10
    1
      src/freedombone-app-mumble
  2. 11
    2
      src/freedombone-app-sip
  3. 0
    14
      src/freedombone-backup-remote

+ 10
- 1
src/freedombone-app-mumble View File

@@ -94,7 +94,16 @@ function restore_local_mumble {
94 94
 }
95 95
 
96 96
 function backup_remote_mumble {
97
-	echo -n ''
97
+	if [ -f /etc/mumble-server.ini ]; then
98
+		echo $"Backing up VoIP settings"
99
+		if [ ! -d /root/tempvoipbackup ]; then
100
+			mkdir -p /root/tempvoipbackup
101
+		fi
102
+		cp -f /etc/mumble-server.ini /root/tempvoipbackup
103
+		cp -f /var/lib/mumble-server/mumble-server.sqlite /root/tempvoipbackup
104
+		backup_directory_to_friend /root/tempvoipbackup voip
105
+		echo $"Backup of VoIP settings complete"
106
+	fi
98 107
 }
99 108
 
100 109
 function restore_remote_mumble {

+ 11
- 2
src/freedombone-app-sip View File

@@ -38,7 +38,7 @@ VOIP_TURN_TLS_PORT=5349
38 38
 VOIP_TURN_NONCE=
39 39
 
40 40
 function reconfigure_sip {
41
-    echo -n ''
41
+	echo -n ''
42 42
 }
43 43
 
44 44
 function upgrade_sip {
@@ -81,7 +81,16 @@ function restore_local_sip {
81 81
 }
82 82
 
83 83
 function backup_remote_sip {
84
-	echo -n ''
84
+	if [ -f /etc/sipwitch.conf ]; then
85
+		echo $"Backing up SIP settings"
86
+		temp_backup_dir=/root/tempsipbackup
87
+		if [ ! -d $temp_backup_dir ]; then
88
+			mkdir -p $temp_backup_dir
89
+		fi
90
+		cp -f /etc/sipwitch.conf $temp_backup_dir
91
+		backup_directory_to_friend $temp_backup_dir sip
92
+		echo $"Backup SIP settings complete"
93
+	fi
85 94
 }
86 95
 
87 96
 function restore_remote_sip {

+ 0
- 14
src/freedombone-backup-remote View File

@@ -276,19 +276,6 @@ function backup_admin_readme {
276 276
 	fi
277 277
 }
278 278
 
279
-function backup_voip {
280
-	if [ -f /etc/mumble-server.ini ]; then
281
-		echo $"Backing up VoIP settings"
282
-		if [ ! -d /root/tempvoipbackup ]; then
283
-			mkdir -p /root/tempvoipbackup
284
-		fi
285
-		cp -f /etc/mumble-server.ini /root/tempvoipbackup
286
-		cp -f /var/lib/mumble-server/mumble-server.sqlite /root/tempvoipbackup
287
-		cp -f /etc/sipwitch.conf /root/tempvoipbackup
288
-		backup_directory_to_friend /root/tempvoipbackup voip
289
-	fi
290
-}
291
-
292 279
 function backup_mariadb {
293 280
 	if [ ${#DATABASE_PASSWORD} -gt 1 ]; then
294 281
 		if [ ! -d /root/tempmariadb ]; then
@@ -438,7 +425,6 @@ if [[ $TEST_MODE == "no" ]]; then
438 425
 	backup_certs
439 426
 	backup_mailing_list
440 427
 
441
-	backup_voip
442 428
 
443 429
 	backup_extra_directories
444 430
 fi