custom-prometheus-exporter/index.php
Jeroen De Meerleer b52abb69c7
Updated script execution path
The shell_exec command in index.php has been updated to include the document root in the script path. This change ensures that the correct script is executed regardless of the current working directory.
2024-06-13 14:33:48 +02:00

7 lines
252 B
PHP

<?php
header('Content-Type: text/plain; version=0.0.4');
$config = getenv('CONFIG_FILE');
$phpbin = getenv('PHP_BINARY');
$output = shell_exec('CONFIG_FILE="' . $config . '" ' . $phpbin . ' ' . $_SERVER['DOCUMENT_ROOT'] . 'script.php');
echo $output;