diff options
author | mcrane <mctch@yahoo.com> | 2009-08-11 03:50:15 -0600 |
---|---|---|
committer | mcrane <mctch@yahoo.com> | 2009-08-11 03:50:15 -0600 |
commit | 1a14d6a7ec90d54548c01bdb8e0fac7986c50f0b (patch) | |
tree | e2ea5a685109bde27b567c90da0ab9991e46ffab /config/freeswitch_dev/v_status.tmp | |
parent | 723baa1dd513efd04d835d66a599ad306ee978a1 (diff) | |
download | pfsense-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/freeswitch_dev/v_status.tmp')
-rw-r--r-- | config/freeswitch_dev/v_status.tmp | 47 |
1 files changed, 27 insertions, 20 deletions
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.' ) ; } |