diff options
Diffstat (limited to 'adei/scripts')
-rwxr-xr-x | adei/scripts/run-apache.sh | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/adei/scripts/run-apache.sh b/adei/scripts/run-apache.sh index 90438a7..1db3397 100755 --- a/adei/scripts/run-apache.sh +++ b/adei/scripts/run-apache.sh @@ -15,12 +15,19 @@ LOCK_FILE=.lock fi ) 10> /adei/cfg/$LOCK_FILE -sed -i'' -re '/Listen/ { /(80|443)/!d }' /etc/apache2/listen.conf +#Keep 80 & 443 +#sed -i'' -re '/Listen/ { /(80|443)/!d }' /etc/apache2/listen.conf +#if [ -n "$ADEI_PORTS" ]; then +# for port in $ADEI_PORTS; do +# [ $port -eq 80 ] && continue +# [ $port -eq 443 ] && continue +# echo "Listen $port" >> /etc/apache2/listen.conf +# done +#fi + if [ -n "$ADEI_PORTS" ]; then + echo -n "" > /etc/apache2/listen.conf for port in $ADEI_PORTS; do - [ $port -eq 80 ] && continue - [ $port -eq 443 ] && continue - echo "Listen $port" >> /etc/apache2/listen.conf done fi @@ -48,4 +55,5 @@ if [ -n "$APACHE_SERVERS" -a "$APACHE_SERVERS" -ne 0 ]; then [ $max_spare -eq 0 ] || sed -i'' -re "s/MaxSpareServers(.*)/MaxSpareServers $max_spare/" /etc/apache2/server-tuning.conf fi +rm -f /var/run/httpd.pid /usr/sbin/apache2ctl start -D FOREGROUND |