3
if [ ! -f /adei/cfg/apache.conf ]; then
4
cp -a /opt/configs/apache* /adei/cfg
7
sed -i'' -re '/Listen/ { /(80|443)/!d }' /etc/apache2/listen.conf
8
if [ -n "$ADEI_PORTS" ]; then
9
for port in $ADEI_PORTS; do
10
[ $port -eq 80 ] && continue
11
[ $port -eq 443 ] && continue
13
echo "Listen $port" >> /etc/apache2/listen.conf
17
if [ -n "$APACHE_SERVERS" -a "$APACHE_SERVERS" -ne 0 ]; then
18
if [ $APACHE_SERVERS -eq 1 ]; then
23
elif [ $APACHE_SERVERS -lt 10 ]; then
24
start=$(($APACHE_SERVERS / 2))
34
[ $start -eq 0 ] || sed -i'' -re "s/StartServers(.*)/StartServers $start/" /etc/apache2/server-tuning.conf
35
[ $limit -eq 0 ] || sed -i'' -re "s/MaxClients(.*)/MaxClients $limit/" /etc/apache2/server-tuning.conf
36
[ $min_spare -eq 0 ] || sed -i'' -re "s/MinSpareServers(.*)/MinSpareServers $min_spare/" /etc/apache2/server-tuning.conf
37
[ $max_spare -eq 0 ] || sed -i'' -re "s/MaxSpareServers(.*)/MaxSpareServers $max_spare/" /etc/apache2/server-tuning.conf
40
/usr/sbin/apache2ctl start -D FOREGROUND