Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Add item to menu

    Scheduled Pinned Locked Moved General pfSense Questions
    5 Posts 4 Posters 1.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      markehle
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • ExolonE
        Exolon
        last edited by

        You can edit this file:

        
        /usr/local/www/head.inc
        
        

        However, you will need to make the changes again whenever you update pfSense.

        1 Reply Last reply Reply Quote 0
        • M
          markehle
          last edited by

          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?

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            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>

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • P
              Paint
              last edited by

              @jimp:

              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!

              pfSense i5-4590
              940/880 mbit Fiber Internet from FiOS
              BROCADE ICX6450 48Port L3-Managed Switch w/4x 10GB ports
              Netgear R8000 AP (DD-WRT)

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.