diff options
author | serg dvoriancev <dv_serg@mail.ru> | 2009-05-12 17:43:44 +0400 |
---|---|---|
committer | serg dvoriancev <dv_serg@mail.ru> | 2009-05-12 17:43:44 +0400 |
commit | 8f9a121ffc0774457c9cfc890163d67987f4a631 (patch) | |
tree | fc1b5e4095237c4349daba3e0a21234acdba9a3a /config/freeswitch/freeswitch.inc | |
parent | 55705dc89a83cdda1f804ee8eeeb9fea8de7d948 (diff) | |
parent | 85264c180bf6d4860727e53c33b5e9d59539fff4 (diff) | |
download | pfsense-packages-8f9a121ffc0774457c9cfc890163d67987f4a631.tar.gz pfsense-packages-8f9a121ffc0774457c9cfc890163d67987f4a631.tar.bz2 pfsense-packages-8f9a121ffc0774457c9cfc890163d67987f4a631.zip |
Merge branch 'master' of http://gitweb.pfsense.org/pfsense-packages/mainline
Diffstat (limited to 'config/freeswitch/freeswitch.inc')
-rw-r--r-- | config/freeswitch/freeswitch.inc | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/config/freeswitch/freeswitch.inc b/config/freeswitch/freeswitch.inc index 4a6546eb..dcaf23fb 100644 --- a/config/freeswitch/freeswitch.inc +++ b/config/freeswitch/freeswitch.inc @@ -1710,7 +1710,7 @@ function sync_package_freeswitch() function freeswitch_php_install_command() { global $config; - $freeswitch_package_version = "0.8.5.4"; + $freeswitch_package_version = "0.8.6"; $freeswitch_build_version = "1.0.4 pre 6"; $freeswitch_build_revision = "13238"; @@ -1743,7 +1743,7 @@ function freeswitch_php_install_command() //make a backup copy of the default config - exec("cp -R /usr/local/freeswitch/conf /usr/local/freeswitch/conf.rev".$freeswitch_build_revision.".orig"); + exec("cp -R /usr/local/freeswitch/conf /usr/local/freeswitch/conf.orig"); //remove some default config files that are not needed unlink_if_exists("/usr/local/freeswitch/conf/dialplan/default/01_example.com.xml"); @@ -1783,12 +1783,19 @@ function freeswitch_php_install_command() //exec("cd /usr/local/pkg/;fetch http://www.pfsense.com/packages/config/freeswitch/freeswitch.inc"); //exec("cd /usr/local/pkg/;fetch http://www.pfsense.com/packages/config/freeswitch/freeswitch.xml"); exec("cd /usr/local/pkg/;fetch http://www.pfsense.com/packages/config/freeswitch/freeswitch_dialplan.xml"); - exec("cd /usr/local/pkg/;fetch http://www.pfsense.com/packages/config/freeswitch/freeswitch_external.xml"); - exec("cd /usr/local/pkg/;fetch http://www.pfsense.com/packages/config/freeswitch/freeswitch_internal.xml"); + //exec("cd /usr/local/pkg/;fetch http://www.pfsense.com/packages/config/freeswitch/freeswitch_external.xml"); + //exec("cd /usr/local/pkg/;fetch http://www.pfsense.com/packages/config/freeswitch/freeswitch_internal.xml"); exec("cd /usr/local/pkg/;fetch http://www.pfsense.com/packages/config/freeswitch/freeswitch_modules.xml"); exec("cd /usr/local/pkg/;fetch http://www.pfsense.com/packages/config/freeswitch/freeswitch_public.xml"); exec("cd /usr/local/pkg/;fetch http://www.pfsense.com/packages/config/freeswitch/freeswitch_vars.xml"); + //misc files + if (!is_dir('/usr/local/www/edit_area/')) { + exec("cd /usr/local/pkg/;fetch http://www.pfsense.com/packages/config/freeswitch/edit_area.tgz"); + system('cd /usr/local/www; tar xvpfz /tmp/edit_area.tgz edit_area'); + unlink_if_exists("/tmp/edit_area.tgz"); + } + //rename PHP files from .tmp to .php exec("cd /tmp/;fetch http://www.pfsense.com/packages/config/freeswitch/class.smtp.tmp"); @@ -1854,7 +1861,15 @@ function freeswitch_php_install_command() exec("cd /tmp/;fetch http://www.pfsense.com/packages/config/freeswitch/freeswitch_ivr_options_edit.tmp"); exec("cp /tmp/freeswitch_ivr_options_edit.tmp /usr/local/www/packages/freeswitch/freeswitch_ivr_options_edit.php"); unlink_if_exists("/tmp/freeswitch_ivr_options_edit.tmp"); - + + exec("cd /tmp/;fetch http://www.pfsense.com/packages/config/freeswitch/freeswitch_profiles.php.tmp"); + exec("cp /tmp/freeswitch_profiles.tmp /usr/local/www/packages/freeswitch/freeswitch_profiles.php"); + unlink_if_exists("/tmp/freeswitch_profiles.tmp"); + + exec("cd /tmp/;fetch http://www.pfsense.com/packages/config/freeswitch/freeswitch_profile_edit.tmp"); + exec("cp /tmp/freeswitch_profile_edit.tmp /usr/local/www/packages/freeswitch/freeswitch_profile_edit.php"); + unlink_if_exists("/tmp/freeswitch_profile_edit.tmp"); + exec("cd /tmp/;fetch http://www.pfsense.com/packages/config/freeswitch/freeswitch_public_includes.tmp"); exec("cp /tmp/freeswitch_public_includes.tmp /usr/local/www/packages/freeswitch/freeswitch_public_includes.php"); unlink_if_exists("/tmp/freeswitch_public_includes.tmp"); @@ -2282,7 +2297,9 @@ function freeswitch_php_install_command() // if backup file exists restore it $filename = 'freeswitch.bak.tgz'; if (!is_dir('/root/backup/')) { - exec("mkdir /root/backup/"); + exec("rm -R /usr/local/freeswitch/conf/sip_profiles/"); + exec("rm -R /usr/local/freeswitch/sounds/music/"); + exec("mkdir /root/backup/"); } //extract a specific directory to /usr/local/freeswitch @@ -2297,7 +2314,9 @@ function freeswitch_php_install_command() 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'); + system('cd /usr/local; tar xvpfz /root/backup/'.$filename.' freeswitch/conf/ssl/'); + system('cd /usr/local; tar xvpfz /root/backup/'.$filename.' freeswitch/conf/sip_profiles/'); + //Optional //system('cd /usr/local; tar xvpfz /root/backup/'.$filename.' freeswitch/conf/'); @@ -2332,7 +2351,7 @@ function freeswitch_php_install_command() pclose($handle); if (pkg_is_service_running('freeswitch')) { - sync_package_freeswitch_ivr(); + sync_package_freeswitch_ivr(); } |