source: 1.0/apache2.sh@ 7456

Last change on this file since 7456 was 7338, checked in by richardvm, 15 years ago

Moved to make a clear separation between the two proxy projects

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 2.4 KB
Line 
1#!/bin/sh
2#
3# $FreeBSD: ports/www/apache2/files/apache.sh,v 1.9 2004/08/23 15:44:51 clement Exp $
4#
5
6# PROVIDE: apache2
7# REQUIRE: NETWORKING SERVERS
8# BEFORE: DAEMON
9# KEYWORD: FreeBSD shutdown
10
11#
12# Add the following lines to /etc/rc.conf to enable apache2:
13# apache2_enable (bool): Set to "NO" by default.
14# Set it to "YES" to enable apache2
15# apache2ssl_enable (bool): Set to "NO" by default.
16# Set it to "YES" to start apache with SSL
17# (if <IfDefined SSL> exists in httpd.conf)
18# apache2limits_enable (bool):Set to "NO" by default.
19# Set it to yes to run `limits $limits_args`
20# just before apache starts.
21# apache2_flags (str): Set to "" by default.
22# Extra flags passed to start command
23# apache2limits_args (str): Default to "-e -C daemon"
24# Arguments of pre-start limits run.
25#
26. /etc/rc.subr
27
28name="apache2"
29rcvar=`set_rcvar`
30
31start_precmd="apache2_precmd"
32restart_precmd="apache2_checkconfig"
33reload_precmd="apache2_checkconfig"
34#command="/usr/local/sbin/httpd"
35command="/usr/local/apache2/bin/httpd"
36#pidfile="/var/run/httpd.pid"
37piffile="/usr/local/apache2/logs/httpd.pid"
38#required_files=/usr/local/etc/apache2/httpd.conf
39required_files=/usr/local/apache2/conf/httpd.conf
40
41[ -z "$apache2_enable" ] && apache2_enable="NO"
42[ -z "$apache2ssl_enable" ] && apache2ssl_enable="NO"
43[ -z "$apache2_flags" ] && apache2_flags=""
44[ -z "$apache2limits_enable" ] && apache2limits_enable="NO"
45[ -z "$apache2limits_args" ] && apache2limits_args="-e -C daemon"
46
47load_rc_config $name
48
49checkyesno apache2ssl_enable && \
50 apache2_flags="-DSSL $apache2_flags"
51
52apache2_checkconfig()
53{
54 echo "Performing sanity check on apache2 configuration:"
55 ${command} -t
56}
57
58apache2_precmd()
59{
60 if test -f /usr/local/sbin/envvars
61 then
62 . /usr/local/sbin/envvars
63 fi
64 if checkyesno apache2limits_enable
65 then
66 eval `/usr/bin/limits ${apache2limits_args}` 2>/dev/null
67 else
68 return 0
69 fi
70
71}
72
73sig_reload=SIGUSR1
74
75extra_commands="reload"
76run_rc_command "$1"
77
78
79# PROXY2 /usr/local/etc/rc.d = apache2.sh lokatie en sh naam
80# apache2 = /usr/local/etc/apache2 install Dir
81
82
Note: See TracBrowser for help on using the repository browser.