X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage5%2Fpkg%2Fphp;h=87f343b0c136d4e8decfcad0b4a820a4a44ddbe9;hb=0d0d7090b3b9f64c6ca0c6708b2f4c73f4551689;hp=ad91548b71a69b6e23a6f043cd9c971499dbe4b2;hpb=f3c8db3027d5dc530e1f30c88e0235975211582e;p=hvlinux.git diff --git a/stage5/pkg/php b/stage5/pkg/php index ad91548..87f343b 100644 --- a/stage5/pkg/php +++ b/stage5/pkg/php @@ -48,13 +48,11 @@ hvbuild_post() # To enable PHP support in the Apache web server, a new AddType directive # must be added to the httpd.conf file. - if ! grep "application/x-httpd-php" /etc/apache/httpd.conf \ - 1> /dev/null 2>&1; then + if ! grep -q "application/x-httpd-php" /etc/apache/httpd.conf; then echo "AddType application/x-httpd-php .php" >> /etc/apache/httpd.conf fi - if ! grep "DirectoryIndex" /etc/apache/httpd.conf | grep "index.php" \ - 1> /dev/null 2>&1; then + if ! grep -q "DirectoryIndex" /etc/apache/httpd.conf | grep "index.php"; then sed -i -e "s!\(^DirectoryIndex index.html.*\)!\1 index.php!g" \ /etc/apache/httpd.conf fi