Make the paths more dynamic

This commit is contained in:
FusionPBX 2022-04-23 18:16:19 -06:00 committed by GitHub
parent 2253f2c17c
commit f3047f3f7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -138,10 +138,13 @@
$fax_queue = $database->select($sql, $parameters, 'all');
unset($parameters);
//change the working directory
chdir($document_root);
//process the messages
if (is_array($fax_queue) && @sizeof($fax_queue) != 0) {
foreach($fax_queue as $row) {
$command = "cd /var/www/fusionpbx && /usr/bin/php /var/www/fusionpbx/app/fax_queue/resources/job/fax_send.php ";
$command = exec('which php')." ".$document_root."/app/fax_queue/resources/job/fax_send.php ";
$command .= "'action=send&fax_queue_uuid=".$row["fax_queue_uuid"]."&hostname=".$hostname."&debug=true'";
if (isset($debug)) {
//run process inline to see debug info