| 831 | | // script to write op_server.cfg file from mysql |
|---|
| 832 | | // |
|---|
| 833 | | if(!$amp_conf['FOPDISABLE']) { |
|---|
| 834 | | if (!@include("retrieve_op_conf_from_mysql.php")) { |
|---|
| 835 | | error(_("error running retrieve_op_conf_from_mysql.php")); |
|---|
| 836 | | } |
|---|
| 837 | | /* |
|---|
| 838 | | $script = $amp_conf['AMPBIN'].'/retrieve_op_conf_from_mysql.php'; |
|---|
| 839 | | if (is_executable($script)) { |
|---|
| 840 | | $script .= ' '.$amportalconf.' '.rtrim($asterisk_conf['astetcdir'],DIRECTORY_SEPARATOR); |
|---|
| 841 | | $output = array(); |
|---|
| 842 | | exec($script, $output, $ret); |
|---|
| 843 | | if ($ret) { |
|---|
| 844 | | error(sprintf(_("retrieve_op_conf_from_mysql.php returned with an error code %s"),$ret)); |
|---|
| 845 | | } |
|---|
| 846 | | } else { |
|---|
| 847 | | error(_("retrieve_op_conf_from_mysql.php does not exist or is not executable")); |
|---|
| 848 | | } |
|---|
| 849 | | */ |
|---|
| 850 | | } |
|---|
| 851 | | // generate configuration files |
|---|
| 852 | | // |
|---|
| 853 | | // Leave the legacy scripts in for a little while to help with odd-ball upgrade scenarios if they haven't gotten |
|---|
| 854 | | // a module upgraded yet. In particular Queues |
|---|
| 855 | | // |
|---|
| 856 | | if (!isset($core_conf) || !is_a($core_conf, "core_conf")) { |
|---|
| 857 | | include_once("libfreepbx.confgen.php"); |
|---|
| 858 | | generate_configurations_sip($version); |
|---|
| 859 | | generate_configurations_iax($version); |
|---|
| 860 | | generate_configurations_zap($version); |
|---|
| 861 | | } |
|---|
| 862 | | if (isset($modules['queues']['status']) && $modules['queues']['status'] == MODULE_STATUS_ENABLED && (!isset($queues_conf) || !is_a($queues_conf, "queues_conf"))) { |
|---|
| 863 | | include_once("libfreepbx.confgen.php"); |
|---|
| 864 | | generate_configurations_queues($version); |
|---|
| 865 | | } |
|---|
| 866 | | |
|---|