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

    [SOLVED] When can /etc/rc.restart_webgui be executed?

    Scheduled Pinned Locked Moved webGUI
    5 Posts 2 Posters 1.3k 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.
    • J
      jeffc
      last edited by

      When, exactly, can script /etc/rc.restart_webgui be executed?

      If I run it via the Diagnostics -> Command Prompt -> Execute Shell Command, then I don't think it runs. I remain logged in, and it doesn't appear that the GUI actually restarted.

      If I renew my Let's Encrypt certificate via Acme (Services -> Acme -> Certificates), that runs /etc/rc.restart_webgui at the end, yet I remain logged in.

      If I run the script at the console of my pfSense router via the on-screen console, then I'm logged out of the GUI and the GUI has indeed restarted.

      Clearly, there are "rules" for when /etc/rc.restart_webgui can be executed. What are those rules? Shouldn't the GUI restart anytime that /etc/rc.restart_webgui is executed?

      Thanks!

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

        It can be run by a shell/cron script (like ACME does), or in a shell directly (like the command prompt does), but since that script is a PHP script it does not like to be run the way it gets executed from Diag > Command. No PHP script likes to be run that way, actually, not just rc.restart_webgui.

        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 1
        • J
          jeffc
          last edited by

          My concern here: If ACME runs the script, will the GUI actually restart (and thus the new certificate take effect)?

          If I'm logged in and manually renew my certificate in ACME, then the GUI does not appear to be restarted since I remain logged in (and thus, the new certificate would not take effect since this requires that the GUI be restarted).

          Is the rule that, if ACME runs (and the /etc/rc.restart_webgui is run), does that only take effect if I'm not logged in at the time?

          How can I be certain that, if ACME/Let's Encrypt renews my certificate, the new certificate actually takes effect?

          Thanks!

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

            ACME restarts the GUI just fine.

            Restarting the GUI process will not log you out.

            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 1
            • J
              jeffc
              last edited by

              Ah. I made an assumption that I was logged out if the GUI was restarted. Whoops!

              Thanks for the help!

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