BSDStats
bsdstats
0.1
system("/bin/mkdir -p /usr/local/etc/periodic/monthly/");
system("/usr/bin/fetch -q -o /usr/local/etc/periodic/monthly/ http://www.bsdstats.org/downloads/300.statistics");
system("/bin/chmod a+rx /usr/local/etc/periodic/monthly/300.statistics");
if(!is_file("/usr/local/etc/periodic/monthly/300.statistics") {
update_status("Could not fetch 300.statistics from bsdstats.org");
update_output_window("Install failed. Please check dns, etc");
exit;
}
system("echo monthly_statistics_report_devices=yes >> /etc/periodic.conf");
system("echo monthly_statistics_enable=yes >> /etc/periodic.conf");
system("/usr/local/etc/periodic/monthly/300.statistics");
$getid=file_get_contents("/tmp/getid");
log_error("Thanks for installing BSDStats. Your id is {$getid}.");
update_status("Thanks for installing BSDStats. Your id is {$getid}.");
update_output_window("Thanks for installing BSDStats. Your id is {$getid}.");
system("/bin/cat /etc/periodic.conf | grep -n \"monthly_statistics_report_devices\" >/tmp/periodic.conf");
system("/bin/cat /tmp/periodic.conf | grep -n \"monthly_statistics_enable\" >/etc/periodic.conf");
system("/bin/rm /usr/local/etc/periodic/monthly/300.statistics");
system("/bin/rm /tmp/periodic.conf");
system("/bin/rm /tmp/getid");
/usr/bin/
077
- http://www.pfsense.com/packages/config/bsdstats/bin/dig