Restart Captive Portal from command line after MAC Import



  • 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>



  • 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();
    ?>
    
    

Log in to reply