[SOLVED] When can /etc/rc.restart_webgui be executed?
-
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!
-
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.
-
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!
-
ACME restarts the GUI just fine.
Restarting the GUI process will not log you out.
-
Ah. I made an assumption that I was logged out if the GUI was restarted. Whoops!
Thanks for the help!