I built apache 2.4.2 on CentOS from source and now am trying to create an init.d script to go along with it. A friend gave me one script but it never outputted a success or fail and I disliked it. I found in the tar a httpd.init script file. It just needed the location of apache changed but besides that seemed like it would work. However, it fails to stop httpd. It will start just fine however. Below is my current script in /etc/init.d/httpd. I found on this other topic: Restarting the httpd service in RHEL returns "Stopping httpd: [FAILED]" - How do I fix this? to check that a pid file is created in the /var/run directory but it is not being created there even when starting with service httpd start or the init.d script directly. I'm still fairly new to linux so please explain as much as possible. I'm a fast learner.
Can anyone help me find what's wrong with this script? I'm running CentOS 6.3 x86_x64.