Issue with ACME Certificates Refresh & Restarting HAProxy
-
Hello fellow pfSense users,
I've encountered an issue that I hope some of you might have come across and can assist with. I'm currently utilizing ACME Certificates and I have set it up such that when a certificate is refreshed, HAProxy should restart with the new certificate. For this, I have configured the command /usr/local/etc/rc.d/haproxy.sh to restart HAProxy, as its described in the GUI
However, it seems the restart is not working as intended. Whenever ACME refreshes a certificate and the aforementioned command is executed, I see the following error in the logs:
/status_services.php: The command '/usr/local/etc/rc.d/haproxy.sh stop' returned exit code '1', the output was 'Stopping haproxy. Waiting for PIDS: 81463. Stopping haproxy. No matching processes were found'
From the error, it appears that the script is trying to stop HAProxy, but then either it's not finding the process to stop or there's some other issue that's preventing it from stopping successfully.
Some steps I have tried:
Checking the permissions on the haproxy.sh script to ensure it's executable. Which looks good to me:
-rwxr-xr-x 1 root wheel 1533 Jul 30 08:52 /usr/local/etc/rc.d/haproxy.sh
Ensuring that HAProxy is actually running before the script is executed.
I would really appreciate any insights or suggestions on what might be going wrong here or if anyone has faced a similar issue. Any guidance on troubleshooting or resolving this would be a big help!Thanks in advance for your support!
Best regards,
Max -
oh wups, saw my mistake. Replying for anyone else who runs into this in the future.
I had configured the shell command to run as:
/usr/local/etc/rc.d/haproxy.sh
But it needs to be
/usr/local/etc/rc.d/haproxy.sh restart