From 3e4092f0f5bc79d1bda1346c744c71e3539ae32c Mon Sep 17 00:00:00 2001 From: Markus Frosch Date: Fri, 21 Apr 2017 14:21:55 +0200 Subject: [PATCH] icingaweb2: Configure apache2 for SUSE in testing --- testing/start_test.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/testing/start_test.sh b/testing/start_test.sh index cf7e5b9..d44e050 100755 --- a/testing/start_test.sh +++ b/testing/start_test.sh @@ -15,12 +15,22 @@ fi sudo sh -c "echo 'date.timezone = UTC' >${php_d}/timezone.ini" # Start apache in background -if [ -x /usr/sbin/httpd ]; then +if [ -x /usr/sbin/start_apache2 ]; then + # newer SUSE + sudo a2enmod rewrite + sudo a2enmod php5 + + sudo /usr/sbin/start_apache2 -t + sudo /usr/sbin/start_apache2 -k start +elif [ -x /usr/sbin/apache2ctl ]; then + # older SUSE + sudo a2enmod rewrite + sudo a2enmod php5 + + sudo /etc/init.d/apache2 start +elif [ -x /usr/sbin/httpd ]; then sudo httpd -t sudo httpd -k start -elif [ -x /usr/sbin/apache2 ]; then - sudo apache2 -t - sudo apache2 -k start else echo "Can not detect how to start Apache!" >&2 exit 1