diff options
author | mcrane <mctch@yahoo.com> | 2009-04-30 16:32:59 -0600 |
---|---|---|
committer | mcrane <mctch@yahoo.com> | 2009-04-30 16:32:59 -0600 |
commit | 6911a4803dcf5a8eea3c0f3d1b000a80be4b97cd (patch) | |
tree | 0e299989428fd8c281b945959e5bd954ef231765 /config/freeswitch/freeswitch.inc | |
parent | e96fad36fd611e877fe1467ad2e40f51637a4c73 (diff) | |
download | pfsense-packages-6911a4803dcf5a8eea3c0f3d1b000a80be4b97cd.tar.gz pfsense-packages-6911a4803dcf5a8eea3c0f3d1b000a80be4b97cd.tar.bz2 pfsense-packages-6911a4803dcf5a8eea3c0f3d1b000a80be4b97cd.zip |
FreeSWITCH change backup directory for install to the new directory /root/backup
Diffstat (limited to 'config/freeswitch/freeswitch.inc')
-rw-r--r-- | config/freeswitch/freeswitch.inc | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/config/freeswitch/freeswitch.inc b/config/freeswitch/freeswitch.inc index f3d432f0..fd7a2041 100644 --- a/config/freeswitch/freeswitch.inc +++ b/config/freeswitch/freeswitch.inc @@ -2271,25 +2271,28 @@ function freeswitch_php_install_command() // if backup file exists restore it $filename = 'freeswitch.bak.tgz'; - + if (!is_dir('/root/backup/')) { + exec("mkdir /root/backup/"); + } + //extract a specific directory to /usr/local/freeswitch - if (file_exists('/tmp/'.$filename)) { + if (file_exists('/root/backup/'.$filename)) { //echo "The file $filename exists"; //Recommended - system('cd /usr/local; tar xvpfz /tmp/'.$filename.' freeswitch/db/'); - system('cd /usr/local; tar xvpfz /tmp/'.$filename.' freeswitch/log/'); - system('cd /usr/local; tar xvpfz /tmp/'.$filename.' freeswitch/recordings/'); - system('cd /usr/local; tar xvpfz /tmp/'.$filename.' freeswitch/scripts/'); - system('cd /usr/local; tar xvpfz /tmp/'.$filename.' freeswitch/storage/'); - system('cd /usr/local; tar xvpfz /tmp/'.$filename.' freeswitch/sounds/custom/8000/'); - system('cd /usr/local; tar xvpfz /tmp/'.$filename.' freeswitch/sounds/music/8000/'); - system('cd /usr/local; tar xvpfz /tmp/'.$filename.' freeswitch/conf/ssl'); + system('cd /usr/local; tar xvpfz /root/backup/'.$filename.' freeswitch/db/'); + system('cd /usr/local; tar xvpfz /root/backup/'.$filename.' freeswitch/log/'); + system('cd /usr/local; tar xvpfz /root/backup/'.$filename.' freeswitch/recordings/'); + system('cd /usr/local; tar xvpfz /root/backup/'.$filename.' freeswitch/scripts/'); + system('cd /usr/local; tar xvpfz /root/backup/'.$filename.' freeswitch/storage/'); + system('cd /usr/local; tar xvpfz /root/backup/'.$filename.' freeswitch/sounds/custom/8000/'); + system('cd /usr/local; tar xvpfz /root/backup/'.$filename.' freeswitch/sounds/music/8000/'); + system('cd /usr/local; tar xvpfz /root/backup/'.$filename.' freeswitch/conf/ssl'); //Optional - //system('cd /usr/local; tar xvpfz /tmp/'.$filename.' freeswitch/conf/'); - //system('cd /usr/local; tar xvpfz /tmp/'.$filename.' freeswitch/grammar/'); - //system('cd /usr/local; tar xvpfz /tmp/'.$filename.' freeswitch/htdocs/'); + //system('cd /usr/local; tar xvpfz /root/backup/'.$filename.' freeswitch/conf/'); + //system('cd /usr/local; tar xvpfz /root/backup/'.$filename.' freeswitch/grammar/'); + //system('cd /usr/local; tar xvpfz /root/backup/'.$filename.' freeswitch/htdocs/'); unset($filename); } |