mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Update failed directory permissions
This commit is contained in:
@@ -27,20 +27,6 @@
|
||||
//make sure that prefix-a-leg is set to true in the xml_cdr.conf.xml file
|
||||
|
||||
if ($domains_processed == 1) {
|
||||
|
||||
//get the xml_cdr directory
|
||||
$xml_cdr_dir = $settings->get('switch', 'log').'/xml_cdr';
|
||||
|
||||
//create the failed/size directory
|
||||
if (!file_exists($xml_cdr_dir.'/failed/size')) {
|
||||
mkdir($xml_cdr_dir.'/failed/size', 0660, true);
|
||||
}
|
||||
|
||||
//create the failed/invalid_xml directory
|
||||
if (!file_exists($xml_cdr_dir.'/failed/invalid_xml')) {
|
||||
mkdir($xml_cdr_dir.'/failed/invalid_xml', 0660, true);
|
||||
}
|
||||
|
||||
/*
|
||||
$file_contents = file_get_contents($_SESSION['switch']['conf']['dir']."/autoload_configs/xml_cdr.conf.xml");
|
||||
$file_contents_new = str_replace("param name=\"prefix-a-leg\" value=\"false\"/", "param name=\"prefix-a-leg\" value=\"true\"/", $file_contents);
|
||||
|
||||
@@ -110,12 +110,37 @@
|
||||
file_put_contents($pid_file, getmypid());
|
||||
}
|
||||
|
||||
//get the xml_cdr directory
|
||||
$xml_cdr_dir = $settings->get('switch', 'log').'/xml_cdr';
|
||||
|
||||
//rename the directory
|
||||
if (file_exists($xml_cdr_dir.'/failed/invalid_xml')) {
|
||||
rename($xml_cdr_dir.'/failed/invalid_xml', $xml_cdr_dir.'/failed/xml');
|
||||
}
|
||||
|
||||
//create the invalid xml directory
|
||||
if (!file_exists($xml_cdr_dir.'/failed/xml')) {
|
||||
mkdir($xml_cdr_dir.'/failed/xml', 0770, true);
|
||||
}
|
||||
|
||||
//create the invalid size directory
|
||||
if (!file_exists($xml_cdr_dir.'/failed/size')) {
|
||||
mkdir($xml_cdr_dir.'/failed/size', 0770, true);
|
||||
}
|
||||
|
||||
//create the invalid sql directory
|
||||
if (!file_exists($xml_cdr_dir.'/failed/sql')) {
|
||||
mkdir($xml_cdr_dir.'/failed/sql', 0770, true);
|
||||
}
|
||||
|
||||
//update permissions to correct systems with the wrong permissions
|
||||
if (file_exists($xml_cdr_dir.'/failed')) {
|
||||
exec('chmod 770 -R '.$xml_cdr_dir.'/failed');
|
||||
}
|
||||
|
||||
//import the call detail records from HTTP POST or file system
|
||||
$cdr = new xml_cdr;
|
||||
|
||||
//get the cdr record
|
||||
$xml_cdr_dir = $settings->get('switch', 'log').'/xml_cdr';
|
||||
|
||||
//service loop
|
||||
while (true) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user