Hi petertfm.Thanks for this infusion..It's geat but....I've found an issue.
I'm running the latest firmware version (2.7 - MK4) and Randomroll 3.2. After trying it for a few minutes I noticed there is no logs!!
You use:
randomrollDir="$( cd "$( dirname "$0" )" && pwd)"
to get the directory where Randomroll is installed. This is correct but in /usb/modules/randomroll/randomroll/log.php the code is the following:
<?php
$roll = $_GET['roll'];
$clientIP = $_SERVER["REMOTE_ADDR"];
$clientMAC = exec("cat /proc/net/arp | grep ".$clientIP." | awk '{print $4}'");
$clientName = exec("cat /tmp/dhcp.leases | grep '".$clientMAC."' | awk '{ print $4}'");
if (file_exists('/usb/infusions/randomroll/logs')) {
exec('echo \''.date("Y-m-d H:i:s").' | '.$clientMAC.' | '.$clientIP.' | '.$clientName.' | '.$roll.' | '.$_SERVER["HTTP_REFERER"].'\' >> /usb/infusions/randomroll/logs/RandomRoll.log');
}
unset($roll, $clientIP, $clientMAC, $clientName);
?>
The path to /usb/infusions/randomroll/logs (lines 11-12) is hardcoded and this path doesn't exists. I fixed this issue replacing the wrong path /usb/infusions/randomroll/logs with the right path /usb/modules/randomroll/logs.
Best regards.