3 # This script uses the current values of Girocco::Config to
4 # convert apache.conf.in into apache.conf.
6 # It is run automatically by "make" or "make apache.conf" but
7 # may be run separately if desired.
13 config_options
='admin basedir certsdir cgiroot httpdnsname reporoot webroot'
15 cmd
="sed < apache.conf.in > apache.conf.1.$$ -e '/^##/d'"
16 for option
in $config_options; do
17 cmd
="$cmd -e \"s#@@$option@@#\$cfg_$option#g\""
20 sed < apache.conf
.1.$$
> apache.conf
.2.$$ \
21 -ne '1,/^# ---- BEGIN DUPLICATE LINES ----/p'
22 sed < apache.conf
.1.$$ \
23 -ne '/^# ---- BEGIN LINES TO DUPLICATE ----/,/# ---- END LINES TO DUPLICATE ----/p' | \
24 sed >> apache.conf
.2.$$ \
26 sed < apache.conf
.1.$$
>> apache.conf
.2.$$ \
27 -ne '/^# ---- END DUPLICATE LINES ----/,$p'
28 rm -f apache.conf
.1.$$
29 mv -f apache.conf
.2.$$ apache.conf