Skip to content

Commit

Permalink
added check if php support is already in apache configured
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorCr4nk committed Dec 19, 2020
1 parent b435b1a commit dc66cf7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,14 @@ case "${distribution}" in
sudo zypper install -y ${pkg_required} &> /dev/null
else
echo -e "${TextColorGreen}[NOTE ]${TextColorNone}\tRequired packages are alread installed"
fi
echo -e "${TextColorYellow}[CONFIG ]${TextColorNone}\tAdding index.php to /etc/apache2/httpd.conf"
sudo sed -in '/DirectoryIndex/s/$/ index.php/' ${path_file_conf}
fi
if ! grep "DirctoryIndex" ${path_file_conf} | grep -q "index.php"
then
echo -e "${TextColorGreen}[NOTE ]${TextColorNone}\tPhp is already supported by the apache configuration"
else
echo -e "${TextColorYellow}[CONFIG ]${TextColorNone}\tAdding index.php to /etc/apache2/httpd.conf"
sudo sed -in '/DirectoryIndex/s/$/ index.php/' ${path_file_conf}
fi
if ! sudo a2enmod -l | grep -q php7
then
echo -e "${TextColorYellow}[CONFIG ]${TextColorNone}\tEnabling php module"
Expand Down

0 comments on commit dc66cf7

Please sign in to comment.