diff --git a/usr/local/www/status.php b/usr/local/www/status.php index c86f446d7e..5bbcf14959 100755 --- a/usr/local/www/status.php +++ b/usr/local/www/status.php @@ -52,8 +52,20 @@ /* include all configuration functions */ require_once("guiconfig.inc"); require_once("functions.inc"); +$output_path = "/tmp/status_output/"; +$output_file = "/tmp/status_output.tgz"; + +if (is_dir($output_path)) { + unlink_if_exists("{$output_path}/*"); + @rmdir($output_path); +} +unlink_if_exists($output_file); +mkdir($output_path); function doCmdT($title, $command) { + global $output_path, $output_file; + /* Fixup output directory */ + $rubbish = array('|', '-', '/', '.', ' '); /* fixes the tag to be W3C compliant */ echo "\n\n"; echo "
\n\t\t\t"; /* no newline after pre */
if ($command == "dumpconfigxml") {
+ $ofd = @fopen("{$output_path}/config-sanitized.xml", "w");
$fd = @fopen("/conf/config.xml", "r");
if ($fd) {
while (!feof($fd)) {
@@ -83,10 +96,13 @@ function doCmdT($title, $command) {
$line = preg_replace("/\n\t\t | \n\t
=gettext("Note: make sure to remove any sensitive information " .
"(passwords, maybe also IP addresses) before posting " .
"information from this page in public places (like mailing lists)"); ?>!
-=gettext("Passwords in config.xml have been automatically removed"); ?>.
+=gettext("Passwords in config.xml have been automatically removed"); ?>.
+=gettext("When the page has finished loading, the output will be stored in {$output_file}. It may be downloaded via Diagnostics > Command Prompt or scp."); ?>