aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authormcrane <mctch@yahoo.com>2009-08-11 03:50:15 -0600
committermcrane <mctch@yahoo.com>2009-08-11 03:50:15 -0600
commit1a14d6a7ec90d54548c01bdb8e0fac7986c50f0b (patch)
treee2ea5a685109bde27b567c90da0ab9991e46ffab /config
parent723baa1dd513efd04d835d66a599ad306ee978a1 (diff)
downloadpfsense-packages-1a14d6a7ec90d54548c01bdb8e0fac7986c50f0b.tar.gz
pfsense-packages-1a14d6a7ec90d54548c01bdb8e0fac7986c50f0b.tar.bz2
pfsense-packages-1a14d6a7ec90d54548c01bdb8e0fac7986c50f0b.zip
FreeSWITCH dev package improve the restore procedure on the status page.
Diffstat (limited to 'config')
-rw-r--r--config/freeswitch_dev/v_config.inc7
-rw-r--r--config/freeswitch_dev/v_status.tmp47
2 files changed, 31 insertions, 23 deletions
diff --git a/config/freeswitch_dev/v_config.inc b/config/freeswitch_dev/v_config.inc
index c5553c82..a3573ba9 100644
--- a/config/freeswitch_dev/v_config.inc
+++ b/config/freeswitch_dev/v_config.inc
@@ -382,6 +382,7 @@ function ListFiles($dir) {
}
}
+
function recording_js()
{
@@ -398,9 +399,9 @@ function recording_js()
$tmp .= " //var pin = \"\"; //don't require a pin\n";
$tmp .= " //if you choose not to require a pin then then you may want to add a dialplan condition for a specific caller id\n";
$tmp .= "\n";
- $tmp .= " var digitmaxlength = 0;\n";
- $tmp .= " var timeoutpin = 7500;\n";
- $tmp .= " var timeouttransfer = 7500;\n";
+ $tmp .= " var digitmaxlength = 0;\n";
+ $tmp .= " var timeoutpin = 7500;\n";
+ $tmp .= " var timeouttransfer = 7500;\n";
$tmp .= " var objdate = new Date();\n";
$tmp .= "\n";
$tmp .= " var adjusthours = 0; //Adjust Server time that is set to GMT 7 hours\n";
diff --git a/config/freeswitch_dev/v_status.tmp b/config/freeswitch_dev/v_status.tmp
index ecc9bf1b..70cef363 100644
--- a/config/freeswitch_dev/v_status.tmp
+++ b/config/freeswitch_dev/v_status.tmp
@@ -87,26 +87,33 @@ if ($_GET['a'] == "other") {
//extract a specific directory
if (file_exists($v_backup_dir.'/'.$filename)) {
- //echo "The file $filename exists";
-
- //Recommended
- system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/db/');
- system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/log/');
- system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/recordings/');
- system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/scripts/');
- system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/storage/');
- system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/sounds/custom/8000/');
- system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/sounds/music/8000/');
- system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/conf/ssl');
- system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/conf/sip_profiles/');
- system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/conf/vars.xml');
- system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/conf/dialplan/default.xml');
- system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/conf/dialplan/public.xml');
-
- //Optional
- //system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/conf/');
- //system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/grammar/');
- //system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/htdocs/');
+ //echo "The file $filename exists";
+
+ //Clear the following directories to prepare for the Restore
+ exec("rm -R ".$v_conf_dir."/sip_profiles/");
+ exec("rm -R ".$v_dir."/sounds/music/");
+
+ //Recommended
+ system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/db/');
+ system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/log/');
+ system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/recordings/');
+ system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/scripts/');
+ system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/storage/');
+ system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/sounds/custom/8000/');
+ system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/sounds/music/8000/');
+ system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/conf/ssl');
+ system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/conf/sip_profiles/');
+ system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/conf/vars.xml');
+ system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/conf/dialplan/default.xml');
+ system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/conf/dialplan/public.xml');
+
+ //Optional
+ //system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/conf/');
+ //system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/grammar/');
+ //system('cd /usr/local; tar xvpfz '.$v_backup_dir.'/'.$filename.' '.$v_name.'/htdocs/');
+
+ //Synchronize Package
+ sync_package_freeswitch();
header( 'Location: v_status.php?savemsg=Backup+has+been+restored.' ) ;
}