I want a webpage to reflect a log file. I have a bash script that converts the log to html. Currently this runs periodically via crontab, which works, but obviously executions are redundant when the webpage isn't viewed. I'd like to implement a system so the bash script runs only called when the webpage is called.
I gather an index.php script along the lines:
<?php
$message=shell_exec(". /path/script.sh");
?>
.. should generate the index.html
file ok. But is there an easy way to get index.php/Apache to serve that file to the client browser?
index.html
file (for which the answer would be some of linking or redirection).