bullet prove against php 8.1
This commit is contained in:
parent
b91d35a426
commit
95a95aa3cf
1 changed files with 17 additions and 14 deletions
|
|
@ -54,16 +54,6 @@ echo -e "${GREEN}I want to check if required LAMP-Stack is installed. You need:"
|
||||||
echo
|
echo
|
||||||
APTS=()
|
APTS=()
|
||||||
|
|
||||||
# Apache
|
|
||||||
if command -v apache2 &> /dev/null
|
|
||||||
then
|
|
||||||
APACHE="$(apache2 -v | grep 'Server version' | cut -d':' -f 2)"
|
|
||||||
else
|
|
||||||
APACHE='not installed'
|
|
||||||
APTS+=( "apache2" "libapache2-mod-php" )
|
|
||||||
fi
|
|
||||||
echo -e "${GREEN}Apache2: ${APACHE}"
|
|
||||||
|
|
||||||
# Mariadb
|
# Mariadb
|
||||||
if command -v mysql &> /dev/null
|
if command -v mysql &> /dev/null
|
||||||
then
|
then
|
||||||
|
|
@ -144,6 +134,16 @@ then
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Apache
|
||||||
|
if command -v apache2 &> /dev/null
|
||||||
|
then
|
||||||
|
APACHE="$(apache2 -v | grep 'Server version' | cut -d':' -f 2)"
|
||||||
|
else
|
||||||
|
APACHE='not installed'
|
||||||
|
APTS+=( "apache2" )
|
||||||
|
fi
|
||||||
|
echo -e "${GREEN}Apache2: ${APACHE}"
|
||||||
|
|
||||||
if [[ ${APTS[*]} ]]
|
if [[ ${APTS[*]} ]]
|
||||||
then
|
then
|
||||||
echo
|
echo
|
||||||
|
|
@ -165,7 +165,7 @@ fi
|
||||||
echo
|
echo
|
||||||
echo -e "${GREEN}Checking if dependencies are fulfilled..."
|
echo -e "${GREEN}Checking if dependencies are fulfilled..."
|
||||||
echo
|
echo
|
||||||
DEPENDENCIES=("libapache2-mod-php"\
|
DEPENDENCIES=("libapache2-mod-php${PHPVERSION}"\
|
||||||
"php${PHPVERSION}-apcu"\
|
"php${PHPVERSION}-apcu"\
|
||||||
"php${PHPVERSION}-curl"\
|
"php${PHPVERSION}-curl"\
|
||||||
"php${PHPVERSION}-gd"\
|
"php${PHPVERSION}-gd"\
|
||||||
|
|
@ -179,6 +179,10 @@ if [[ ! $PHPVERSION == 8* ]]; then
|
||||||
DEPENDENCIES+=("php${PHPVERSION}-json")
|
DEPENDENCIES+=("php${PHPVERSION}-json")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[$PHPVERSION]]; then
|
||||||
|
update-alternatives --set php /usr/bin/php${PHPVERSION}
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
for REQUIREDPKG in "${DEPENDENCIES[@]}"
|
for REQUIREDPKG in "${DEPENDENCIES[@]}"
|
||||||
do
|
do
|
||||||
|
|
@ -202,7 +206,7 @@ then
|
||||||
echo -e "${RED}Package(s) ${DEPENDENCIES[*]} is/are missing, should I install it/them?${NC}"
|
echo -e "${RED}Package(s) ${DEPENDENCIES[*]} is/are missing, should I install it/them?${NC}"
|
||||||
read -p "(y/n): " INSTALLDEPENDENCIES
|
read -p "(y/n): " INSTALLDEPENDENCIES
|
||||||
case $INSTALLDEPENDENCIES in
|
case $INSTALLDEPENDENCIES in
|
||||||
[Yy]* ) apt update && apt install ${DEPENDENCIES[*]} -y; break;;
|
[Yy]* ) apt update && apt install ${DEPENDENCIES[*]} -y; a2enmod php${PHPVERSION}; break;;
|
||||||
[Nn]* ) echo -e "${RED}I need ${DEPENDENCIES[*]} to process, abort."; exit;;
|
[Nn]* ) echo -e "${RED}I need ${DEPENDENCIES[*]} to process, abort."; exit;;
|
||||||
* ) echo "Please answer y[es] or n[o].";;
|
* ) echo "Please answer y[es] or n[o].";;
|
||||||
esac
|
esac
|
||||||
|
|
@ -284,7 +288,6 @@ do
|
||||||
while true; do
|
while true; do
|
||||||
read -p "(y/n): " SURE
|
read -p "(y/n): " SURE
|
||||||
case $SURE in
|
case $SURE in
|
||||||
[Yy]* )
|
|
||||||
export WEBSITENAME;
|
export WEBSITENAME;
|
||||||
export SERVERADMINEMAIL;
|
export SERVERADMINEMAIL;
|
||||||
FINISHED=true;
|
FINISHED=true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue