httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RYAN vAN GINNEKEN <l...@computerking.ca>
Subject [users@httpd] start at boottime??
Date Fri, 18 Feb 2005 03:13:10 GMT
How come my apache does not start at boot time? I have the following
files in my rc.d

-r-xr-xr-x  1 root  wheel   2063 Feb 17 19:19 apache.sh
-r-xr-xr-x  1 root  wheel   2063 Feb 17 19:27 apache2.sh

even went so far as to create an apache2.sh the contents of the file are 
below.  Have added the following lines to
my /etc/rc.conf the only way i can get apache to start is to type
apachectl startssl or to modify the apache.sh and apache2.sh scripts and
change the default values from NO to YES.  Running freebsd 4.10 and
apache 2.0.52

apache2_enabled="YES"
apache2ssl_enabled="YES"


#!/bin/sh
#
# $FreeBSD: ports/www/apache2/files/apache.sh,v 1.11 2005/01/11 13:45:05
clement Exp $
#

# PROVIDE: apache2
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: FreeBSD shutdown

#
# Add the following lines to /etc/rc.conf to enable apache2:
# apache2_enable (bool):      Set to "NO" by default.
#                             Set it to "YES" to enable apache2
# apache2ssl_enable (bool):   Set to "NO" by default.
#                             Set it to "YES" to start apache with SSL
#                             (if <IfDefined SSL> exists in httpd.conf)
# apache2limits_enable (bool):Set to "NO" by default.
#                             Set it to yes to run `limits $limits_args`
#                             just before apache starts.
# apache2_flags (str):        Set to "" by default.
#                             Extra flags passed to start command.
# apache2limits_args (str):   Default to "-e -C daemon"
#                             Arguments of pre-start limits run.
#
. %%RC_SUBR%%

name="apache2"
rcvar=`set_rcvar`

start_precmd="apache2_precmd"
restart_precmd="apache2_checkconfig"
reload_precmd="apache2_checkconfig"
command="%%PREFIX%%/sbin/httpd"
pidfile="/var/run/httpd.pid"
required_files=%%PREFIX%%/etc/apache2/httpd.conf

[ -z "$apache2_enable" ]       && apache2_enable="NO"
[ -z "$apache2ssl_enable" ]    && apache2ssl_enable="NO"
[ -z "$apache2_flags" ]        && apache2_flags=""
[ -z "$apache2limits_enable" ] && apache2limits_enable="NO"
[ -z "$apache2limits_args" ]   && apache2limits_args="-e -C daemon"

load_rc_config $name

checkyesno apache2ssl_enable && \
                        apache2_flags="-DSSL $apache2_flags"

apache2_checkconfig()
{
        echo "Performing sanity check on apache2 configuration:"
        ${command} ${apache2_flags} -t
}

apache2_precmd()
{
        if test -f %%PREFIX%%/sbin/envvars
        then
                . %%PREFIX%%/sbin/envvars
        fi
        if checkyesno apache2limits_enable
        then
                eval `/usr/bin/limits ${apache2limits_args}` 2>/dev/null
        else
                return 0
        fi

}

sig_reload=SIGUSR1

extra_commands="reload"
run_rc_command "$1"



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message