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

    Restart Captive Portal from command line after MAC Import

    Scheduled Pinned Locked Moved Captive Portal
    2 Posts 1 Posters 2.6k 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.
    • X
      XBRMann
      last edited by

      I have a script that runs on a hourly basis to import MAC addresses from a table of "Authorized" computers from our Network Device database into the <passthrumac>section of the /conf/config.xml file.  After I import the data, I save the /conf/config.xml file, and kill the /tmp/config.cache however the /var/db/captiveportal_mac.db file never changes until I completely restart the system.  I assuming it's possible to just restart the captive portal daemon, does anyone know that command off hand?  If not I could just import the data into the /var/db/captiveportal_mac.db as well, but I'd like to keep this as simple as possible.</passthrumac>

      1 Reply Last reply Reply Quote 0
      • X
        XBRMann
        last edited by

        I figured out my own problem.  I found the code in the admin webpages that restarts the captive portal services after you change them and press the "Save" button and I just called them on my own.  Seems to work well for me!

        
        #!/usr/local/bin/php -q
                require_once("captiveportal.inc");
                captiveportal_configure();
        ?>
        
        
        1 Reply Last reply Reply Quote 1
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.