Koozali.org: home of the SME Server

Custum Template for /etc/init.d/httpd

Offline edb

  • *
  • 546
  • +0/-0
Custum Template for /etc/init.d/httpd
« on: March 28, 2007, 09:05:07 PM »
Does anyone know how I can create a custom template to add two lines to /etc/init.d/httpd file in the section below start() {
# The semantics of these two functions differ from the way apachectl does
# things -- attempting to start while running is a failure, and shutdown
# when not running is also a failure.  So we just do it the way init scripts
# are expected to behave here.
start() {
        myexample=/home/e-smith/files/ibays/store
    export myexample

    echo -n $"Starting $prog: "
        daemon $httpd `moduleargs` $OPTIONS
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && touch /var/lock/subsys/httpd
        return $RETVAL
}
stop() {

I have this working by directly editing this file but when the server reboots I always have to do a "service httpd restart" to get this one website going again. I don't know why that is but it is a pain if I forget about it for a while as no one can access the site until I restart the service?

Any advise is welcome.
Thanks
......