Allow httpd to restart after the sever reboot from poweroff
If a server reboots brutally, there will be a legacy httpd pid file stay in the file system, and the OS may reuse the PID that remains in that file, which will cause httpd service to fail to start even if there is no such httpd service is running.
This commit implemented the following logic:
- If there is no existing PID file, then run the httpd service directly
- If the PID file exists and contains the PID used by another process, we delete the PID file, then restart the httpd service
- If the PID file exists and contains the PID used by another running httpd service, we allow the httpd report the "already running" error normally