Add item to menu
-
Folks - At the library I work at we like to keep track of unique mac addresses that wander in and out of our wireless system on any given day. We use it to justify spending more money on wireless hardware from time to time.
I wrote a system a number of years ago that takes a snapshot of ARP entries every 5 minutes then adds unique macs it finds to a daily file. I have been triggering the reporting of this from our webserver, but every time there is a pfsense upgrade, ssh keys get screwed up, and this last upgrade made the ssh key exchange not work as well.
I have since put all of this on the firewall, and I wrote a little php script (copied from the status.php file I found in the root dir of the pfsense web server) to report out the mac counts for a given date range. It works well for us and I would like to add a link to this script to the pfsense menu.
I don't really consider this to be a package as it's just a shell script that captures the macs and the php script that counts lines of files to get a mac count.
How do I add it to, say, the status menu such that it will stay through an upgrade?
Thanks -
Mark
-
You can edit this file:
/usr/local/www/head.inc
However, you will need to make the changes again whenever you update pfSense.
-
Yup - that does it. Thanks! That will work for now. I suppose if I need it to persist through an upgrade I do need to make it a package?
-
To make it stay across upgrades, use a
<menu>tag inside the packages section of your config.xml. Install a package and then look at its
<menu>tag and follow the same general syntax.</menu>
</menu>
-
To make it stay across upgrades, use a
<menu>tag inside the packages section of your config.xml. Install a package and then look at its
<menu>tag and follow the same general syntax.
</menu></menu>
agreed! This is the best way to add a menu link that stays across upgrades and updates!