Merge pull request 'PHP 8 intergration readiness' (#11) from PHP8-Testing into master
Reviewed-on: https://git.ictmaatwerk.com/VPS-scripts/Web-V2/pulls/11
This commit was merged in pull request #11.
This commit is contained in:
@@ -6,11 +6,15 @@ if [ ! -f "/etc/ICTM/selopts.list" ] || [ ! -f "/etc/ICTM/mainvar.list" ] ; then
|
|||||||
|
|
||||||
source /etc/ICTM/selopts.list
|
source /etc/ICTM/selopts.list
|
||||||
source /etc/ICTM/mainvar.list
|
source /etc/ICTM/mainvar.list
|
||||||
|
if [ -z $shortdist ] ; then source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/MicroOSDetect.sh) ; fi
|
||||||
if [ $webserv != nginx_nonphp ]; then
|
if [ $webserv != nginx_nonphp ]; then
|
||||||
if [ ! -f "/etc/ICTM/phpvar.list" ] ; then echo 'Php var list missing,Please run /Scipts/GeneratePhplist from the repo ' && exit ; fi
|
if [ ! -f "/etc/ICTM/phpvar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GeneratePhplist.sh) ; fi
|
||||||
source /etc/ICTM/phpvar.list
|
source /etc/ICTM/phpvar.list
|
||||||
fi
|
fi
|
||||||
if [ -f "/etc/ICTM/apachevar.list" ] ; then source /etc/ICTM/apachevar.list; fi
|
if [ $webserv = apache ]; then
|
||||||
|
if [ ! -f "/etc/ICTM/apachevar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GenerateApacheList.sh) ; fi
|
||||||
|
source /etc/ICTM/apachevar.list
|
||||||
|
fi
|
||||||
rm /tmp/pkg.list > $OUTPUT 2>&1
|
rm /tmp/pkg.list > $OUTPUT 2>&1
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/ModulesMenu.list)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/ModulesMenu.list)
|
||||||
|
|
||||||
|
|||||||
@@ -10,11 +10,15 @@ if [ ! -f "/etc/ICTM/selopts.list" ] || [ ! -f "/etc/ICTM/mainvar.list" ] ; then
|
|||||||
|
|
||||||
source /etc/ICTM/selopts.list
|
source /etc/ICTM/selopts.list
|
||||||
source /etc/ICTM/mainvar.list
|
source /etc/ICTM/mainvar.list
|
||||||
|
if [ -z $shortdist ] ; then source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/MicroOSDetect.sh) ; fi
|
||||||
if [ $webserv != nginx_nonphp ]; then
|
if [ $webserv != nginx_nonphp ]; then
|
||||||
if [ ! -f "/etc/ICTM/phpvar.list" ] ; then echo 'Php var list missing,Please run /Scipts/GeneratePhplist from the repo ' && exit ; fi
|
if [ ! -f "/etc/ICTM/phpvar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GeneratePhplist.sh) ; fi
|
||||||
source /etc/ICTM/phpvar.list
|
source /etc/ICTM/phpvar.list
|
||||||
fi
|
fi
|
||||||
if [ -f "/etc/ICTM/apachevar.list" ] ; then source /etc/ICTM/apachevar.list; fi
|
if [ $webserv = apache ]; then
|
||||||
|
if [ ! -f "/etc/ICTM/apachevar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GenerateApacheList.sh) ; fi
|
||||||
|
source /etc/ICTM/apachevar.list
|
||||||
|
fi
|
||||||
rm /tmp/pkg.list
|
rm /tmp/pkg.list
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/ModulesMenu.list)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/ModulesMenu.list)
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ cat <<EOF > /var/www/$domain/html/config/autoconfig.php
|
|||||||
"dbname" => "${db_name}",
|
"dbname" => "${db_name}",
|
||||||
"dbuser" => "${db_user}",
|
"dbuser" => "${db_user}",
|
||||||
"dbpass" => "${db_pass}",
|
"dbpass" => "${db_pass}",
|
||||||
"dbhost" => "localhost",
|
"dbhost" => "127.0.0.1",
|
||||||
"dbtableprefix" => "",
|
"dbtableprefix" => "",
|
||||||
"simpleSignUpLink.shown" => false,
|
"simpleSignUpLink.shown" => false,
|
||||||
"directory" => "/var/www/$domain/html/data",
|
"directory" => "/var/www/$domain/html/data",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
define('DB_NAME', 'DBName');
|
define('DB_NAME', 'DBName');
|
||||||
define('DB_USER', 'DBUser');
|
define('DB_USER', 'DBUser');
|
||||||
define('DB_PASSWORD', 'DBPass');
|
define('DB_PASSWORD', 'DBPass');
|
||||||
define('DB_HOST', 'localhost');
|
define('DB_HOST', '127.0.0.1');
|
||||||
define('DB_CHARSET', 'utf8');
|
define('DB_CHARSET', 'utf8');
|
||||||
define('DB_COLLATE', '');
|
define('DB_COLLATE', '');
|
||||||
#define( 'WP_SITEURL', '' );
|
#define( 'WP_SITEURL', '' );
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
for f in /etc/apache2/sites-available/*; do
|
if [ ! -f "/etc/ICTM/apachevar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GenerateApacheList.sh) ; fi
|
||||||
|
source /etc/ICTM/apachevar.list
|
||||||
|
|
||||||
|
for f in $apacheConfDir/sites-available/*; do
|
||||||
if [ $IMODE = n ] && [ $PhpPurge = 0 ]; then
|
if [ $IMODE = n ] && [ $PhpPurge = 0 ]; then
|
||||||
if (whiptail --title "Update apache config ?" --yesno "Update php version in apache site: ${f##*/} ?" 8 78); then
|
if (whiptail --title "Update apache config ?" --yesno "Update php version in apache site: ${f##*/} ?" 8 78); then
|
||||||
sed -i "s/$phpver/$newphpver/" $f
|
sed -i "s/$phpver/$newphpver/" $f
|
||||||
@@ -21,4 +24,4 @@ for f in /etc/apache2/sites-available/*; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
systemctl reload apache2
|
systemctl reload $apacheService
|
||||||
101
PhpUpdater.sh
101
PhpUpdater.sh
@@ -1,11 +1,18 @@
|
|||||||
#sysCheck
|
#sysCheck
|
||||||
if [ ! -f "/etc/ICTM/selopts.list" ] || [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi
|
if [ ! -f "/etc/ICTM/selopts.list" ] || [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi
|
||||||
|
rm /tmp/pkg.list
|
||||||
PKGI="${PKGM} install -y --no-install-recommends"
|
|
||||||
#Getting variables
|
#Getting variables
|
||||||
source /etc/ICTM/mainvar.list
|
source /etc/ICTM/mainvar.list
|
||||||
PPAversion=`apt list php | egrep -o "([0-9]{1,}.)+[0-9]{1,}" | cut -c 3-` && PPAversion=`echo $PPAversion | awk '{print $1; }' | cut -f1 -d"+"`
|
if [ -z $shortdist ] ; then source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/MicroOSDetect.sh) ; fi
|
||||||
|
if [ ! -f "/etc/ICTM/phpvar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GeneratePhplist.sh) ; fi
|
||||||
|
source /etc/ICTM/phpvar.list
|
||||||
|
if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then
|
||||||
|
apt update
|
||||||
|
RepoVersion=`apt list |grep php | grep deb.sury.org| cut -f1 -d"-"| tail -1 |sed 's/php//'`
|
||||||
|
elif [ "$shortdist" = "el8" ]; then
|
||||||
|
dnf check-update --refresh
|
||||||
|
RepoVersion=`dnf list php* | awk '{print $1; }' | cut -f1 -d"-"| tail -1 |sed 's/php//' | sed 's/./&./1'`
|
||||||
|
fi
|
||||||
msg () {
|
msg () {
|
||||||
if [ $IMODE = n ]; then
|
if [ $IMODE = n ]; then
|
||||||
TERM=ansi whiptail --title "Info" --msgbox "$1" 8 52
|
TERM=ansi whiptail --title "Info" --msgbox "$1" 8 52
|
||||||
@@ -19,39 +26,25 @@ msg "Current php version: $phpver"
|
|||||||
|
|
||||||
if [ $IMODE = n ]; then
|
if [ $IMODE = n ]; then
|
||||||
# Legacy/Main Menu
|
# Legacy/Main Menu
|
||||||
PKGP="debconf-apt-progress -- apt purge -y"
|
PKGD="debconf-apt-progress -- apt purge -y"
|
||||||
|
|
||||||
#Menu
|
#Menu
|
||||||
if (whiptail --title "Set new php version?" --yesno "Install php version $PPAversion ?" 8 78); then
|
if (whiptail --title "Set new php version?" --yesno "Install php version $RepoVersion ?" 8 78); then
|
||||||
newphpver=$PPAversion
|
newphpver=$RepoVersion
|
||||||
else
|
else
|
||||||
newphpver=$(whiptail --inputbox "Please enter the version to install" --title "Custom" 8 39 3>&1 1>&2 2>&3)
|
newphpver=$(whiptail --inputbox "Please enter the version to install" --title "Custom" 8 39 3>&1 1>&2 2>&3)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Install
|
|
||||||
apt list --installed | less | grep php$phpver | cut -f1 -d"/" | sed "s/$phpver/$newphpver/" | xargs $PKGI
|
|
||||||
|
|
||||||
#Config
|
|
||||||
cp /etc/php/$phpver/fpm/pool.d/* /etc/php/$newphpver/fpm/pool.d/
|
|
||||||
|
|
||||||
#Purge
|
|
||||||
if (whiptail --title "Set new php version?" --yesno "Remove php $phpver ?" 8 78); then
|
|
||||||
PhpPurge=1
|
|
||||||
$PKGP -y php$phpver*
|
|
||||||
else
|
|
||||||
PhpPurge=0
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $IMODE = l ]; then
|
if [ $IMODE = l ]; then
|
||||||
# Legacy/Main Menu
|
# Legacy/Main Menu
|
||||||
PKGP="apt purge -y"
|
PKGD="apt purge -y"
|
||||||
|
|
||||||
#Menu
|
#Menu
|
||||||
while true; do
|
while true; do
|
||||||
read -p "Set phpversion to version $PPAversion ? -> yes/no?" yn
|
read -p "Set phpversion to version $RepoVersion ? -> yes/no?" yn
|
||||||
case $yn in
|
case $yn in
|
||||||
[Yy]* ) newphpver=$PPAversion
|
[Yy]* ) newphpver=$RepoVersion
|
||||||
break;;
|
break;;
|
||||||
[Nn]* ) echo "";
|
[Nn]* ) echo "";
|
||||||
echo "Please enter php version to install:";read newphpver
|
echo "Please enter php version to install:";read newphpver
|
||||||
@@ -59,18 +52,56 @@ if [ $IMODE = l ]; then
|
|||||||
* ) echo "Choose yes or no.";;
|
* ) echo "Choose yes or no.";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
#Genereating vars for new php version
|
||||||
|
if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then
|
||||||
|
# Debian/Ubunbtu Php variables
|
||||||
|
newphpPoolDir=/etc/php/${newphpver}/fpm/pool.d
|
||||||
|
newphpPkgName=php${newphpver}
|
||||||
|
newphpMainConf=/etc/php/${newphpver}/fpm/php.ini
|
||||||
|
newphpFPMService=php${newphpver}-fpm
|
||||||
|
PKGP=$PKGD
|
||||||
|
apt list --installed | less | grep php$phpver | cut -f1 -d"/" | sed "s/$phpPkgName/$newphpPkgName/" > /tmp/pkg.list
|
||||||
|
elif [ "$shortdist" = "el8" ]; then
|
||||||
|
# Centos Php variable
|
||||||
|
newphpPoolDir=/etc/opt/remi/php${newphpver//.}/php-fpm.d/
|
||||||
|
newphpPkgName=php${newphpver//.}-php
|
||||||
|
newphpMainConf=/etc/opt/remi/php${newphpver//.}/php.ini
|
||||||
|
newphpFPMService=php${newphpver//.}-php-fpm
|
||||||
|
PKGP="dnf remove -y"
|
||||||
|
dnf list --installed | sort | grep $phpPkgName | awk '{print $1;}' | cut -f1 -d"." | sed "s/$phpPkgName/$newphpPkgName/" > /tmp/pkg.list
|
||||||
|
fi
|
||||||
|
|
||||||
#Install
|
#Install
|
||||||
apt list --installed | less | grep php$phpver | cut -f1 -d"/" | sed "s/$phpver/$newphpver/" | xargs $PKGI
|
|
||||||
|
if [ ${newphpver//.} -ge 80 ] && [ ${newphpver//.} -lt 90 ]; then
|
||||||
|
sed -i -e "s/$newphpPkgName-xmlrpc//g" -e "s/$newphpPkgName-json//g" /tmp/pkg.list
|
||||||
|
fi
|
||||||
|
cat /tmp/pkg.list | xargs $PKGI
|
||||||
|
|
||||||
#Config
|
#Config
|
||||||
cp /etc/php/$phpver/fpm/pool.d/* /etc/php/$newphpver/fpm/pool.d/
|
systemctl stop $newphpFPMService
|
||||||
|
cp $phpPoolDir/* $newphpPoolDir
|
||||||
|
|
||||||
|
|
||||||
|
if [ $IMODE = n ]; then
|
||||||
|
#Purge
|
||||||
|
if (whiptail --title "Set new php version?" --yesno "Remove php $phpver ?" 8 78); then
|
||||||
|
PhpPurge=1
|
||||||
|
$PKGP -y $phpPkgName*
|
||||||
|
else
|
||||||
|
PhpPurge=0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ $IMODE = l ]; then
|
||||||
#Purge
|
#Purge
|
||||||
while true; do
|
while true; do
|
||||||
read -p "Remove php $phpver ? -> yes/no?" yn
|
read -p "Remove php $phpver ? -> yes/no?" yn
|
||||||
case $yn in
|
case $yn in
|
||||||
[Yy]* ) PhpPurge=1 ; $PKGP php$phpver*
|
[Yy]* ) PhpPurge=1 ; $PKGP $phpPkgName*
|
||||||
break;;
|
break;;
|
||||||
[Nn]* ) PhpPurge=0 ; echo ""
|
[Nn]* ) PhpPurge=0 ; echo ""
|
||||||
break;;
|
break;;
|
||||||
@@ -79,13 +110,23 @@ if [ $IMODE = l ]; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for f in /etc/php/$newphpver/fpm/pool.d/*; do
|
for f in $newphpPoolDir/*; do
|
||||||
sed -i "s/$phpver/$newphpver/" $f
|
sed -i "s/$phpver/$newphpver/" $f
|
||||||
|
sed -i "s/${phpver//.}/${newphpver//.}/" $f
|
||||||
done
|
done
|
||||||
systemctl reload php$newphpver-fpm
|
|
||||||
|
systemctl start $newphpFPMService
|
||||||
|
systemctl enable $newphpFPMService
|
||||||
|
|
||||||
|
|
||||||
sed -i "/phpver/c\phpver=\"$newphpver\"" /etc/ICTM/mainvar.list
|
sed -i "/phpver/c\phpver=\"$newphpver\"" /etc/ICTM/mainvar.list
|
||||||
|
|
||||||
|
mv /etc/ICTM/phpvar.list /etc/ICTM/phpvar"$phpver".list
|
||||||
|
for storeme in newphpPoolDir newphpPkgName newphpMainConf newphpFPMService; do
|
||||||
|
declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/phpvar.list
|
||||||
|
done
|
||||||
|
sed -i 's/new//' /etc/ICTM/phpvar.list
|
||||||
|
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/phpupdate-handeler.sh; then
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/phpupdate-handeler.sh; then
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/phpupdate-handeler.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/phpupdate-handeler.sh)
|
||||||
fi
|
fi
|
||||||
19
Scripts/GenerateApacheList.sh
Normal file
19
Scripts/GenerateApacheList.sh
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
if [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi
|
||||||
|
source /etc/ICTM/mainvar.list
|
||||||
|
if [ -z $shortdist ] ; then source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/MicroOSDetect.sh) ; fi
|
||||||
|
|
||||||
|
if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then
|
||||||
|
# Debian/Ubunbtu apache variables
|
||||||
|
apacheConfDir=/etc/apache2
|
||||||
|
apacheService=apache2
|
||||||
|
|
||||||
|
elif [ "$shortdist" = "el8" ]; then
|
||||||
|
# Centos Php variable
|
||||||
|
apacheConfDir=/etc/httpd
|
||||||
|
apacheService=httpd
|
||||||
|
fi
|
||||||
|
|
||||||
|
#Storing vars to config
|
||||||
|
for storeme in apacheService apacheConfDir; do
|
||||||
|
declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/apachevar.list
|
||||||
|
done
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
if [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi
|
if [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi
|
||||||
|
source /etc/ICTM/mainvar.list
|
||||||
|
if [ -z $shortdist ] ; then source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/MicroOSDetect.sh) ; fi
|
||||||
|
|
||||||
if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then
|
if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then
|
||||||
# Debian/Ubunbtu Php variables
|
# Debian/Ubunbtu Php variables
|
||||||
|
|||||||
14
Scripts/MicroOSDetect.sh
Normal file
14
Scripts/MicroOSDetect.sh
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
dist_ver=$(grep --color=never -Po "^VERSION_ID=\K.*" "/etc/os-release")
|
||||||
|
dist=$(grep --color=never -Po "^ID=\K.*" "/etc/os-release")
|
||||||
|
|
||||||
|
if [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"18.04"* ]]; then
|
||||||
|
shortdist=ubu1804
|
||||||
|
elif [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"20.04"* ]]; then
|
||||||
|
shortdist=ubu2004
|
||||||
|
elif [[ "${dist}" == *"debian"* ]] && [[ "${dist_ver}" == *"10"* ]]; then
|
||||||
|
shortdist=deb10
|
||||||
|
elif [[ "${dist}" == *"centos"* ]] && [[ "${dist_ver}" == *"8"* ]]; then
|
||||||
|
shortdist=el8
|
||||||
|
else
|
||||||
|
echo "This os in known"
|
||||||
|
fi
|
||||||
@@ -1 +0,0 @@
|
|||||||
php-pear
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
PHPprefix-pear PHPprefix
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
PHPprefix-imagick PHPprefix-cli PHPprefix-apcu PHPprefix-fpm PHPprefix-mysql PHPprefix-cgi PHPprefix-common PHPprefix-mbstring PHPprefix-curl PHPprefix-gd PHPprefix-intl PHPprefix-soap PHPprefix-xml PHPprefix-xmlrpc PHPprefix-zip
|
|
||||||
1
SubModules/php-fpm/php7x/apt.php.pkg.list
Normal file
1
SubModules/php-fpm/php7x/apt.php.pkg.list
Normal file
@@ -0,0 +1 @@
|
|||||||
|
php-pear PHPprefix-mysql
|
||||||
1
SubModules/php-fpm/php7x/dnf.php.pkg.list
Normal file
1
SubModules/php-fpm/php7x/dnf.php.pkg.list
Normal file
@@ -0,0 +1 @@
|
|||||||
|
PHPprefix-pear PHPprefix PHPprefix-mysqlnd
|
||||||
1
SubModules/php-fpm/php7x/generic.php.pkg.list
Normal file
1
SubModules/php-fpm/php7x/generic.php.pkg.list
Normal file
@@ -0,0 +1 @@
|
|||||||
|
PHPprefix-imagick PHPprefix-cli PHPprefix-apcu PHPprefix-fpm PHPprefix-cgi PHPprefix-common PHPprefix-mbstring PHPprefix-curl PHPprefix-gd PHPprefix-intl PHPprefix-soap PHPprefix-xml PHPprefix-xmlrpc PHPprefix-zip
|
||||||
1
SubModules/php-fpm/php8x/apt.php.pkg.list
Normal file
1
SubModules/php-fpm/php8x/apt.php.pkg.list
Normal file
@@ -0,0 +1 @@
|
|||||||
|
php-pear PHPprefix-mysql
|
||||||
1
SubModules/php-fpm/php8x/dnf.php.pkg.list
Normal file
1
SubModules/php-fpm/php8x/dnf.php.pkg.list
Normal file
@@ -0,0 +1 @@
|
|||||||
|
PHPprefix-pear PHPprefix PHPprefix-mysqlnd
|
||||||
1
SubModules/php-fpm/php8x/generic.php.pkg.list
Normal file
1
SubModules/php-fpm/php8x/generic.php.pkg.list
Normal file
@@ -0,0 +1 @@
|
|||||||
|
PHPprefix-imagick PHPprefix-cli PHPprefix-apcu PHPprefix-fpm PHPprefix-cgi PHPprefix-common PHPprefix-mbstring PHPprefix-curl PHPprefix-gd PHPprefix-intl PHPprefix-soap PHPprefix-xml PHPprefix-zip
|
||||||
@@ -15,8 +15,25 @@ elif [ "$shortdist" = "el8" ]; then
|
|||||||
mkdir -p /var/run/php
|
mkdir -p /var/run/php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#Setting php version branch
|
||||||
|
if [ ${phpver//.} -ge 70 ] && [ ${phpver//.} -lt 80 ] ; then
|
||||||
|
phpVerBranch=7x
|
||||||
|
elif [ ${phpver//.} -ge 80 ] && [ ${phpver//.} -lt 90 ]; then
|
||||||
|
phpVerBranch=8x
|
||||||
|
fi
|
||||||
|
|
||||||
|
#Getting php pkglist
|
||||||
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/SubModules/php-fpm/php"$phpVerBranch"/generic.php.pkg.list; then
|
||||||
|
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/php-fpm/php"$phpVerBranch"/generic.php.pkg.list >>/tmp/pkg.list
|
||||||
|
printf " " >>/tmp/pkg.list
|
||||||
|
fi
|
||||||
|
|
||||||
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/SubModules/php-fpm/php"$phpVerBranch"/"$PKGLIST".php.pkg.list; then
|
||||||
|
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/php-fpm/php"$phpVerBranch"/"$PKGLIST".php.pkg.list >>/tmp/pkg.list
|
||||||
|
printf " " >>/tmp/pkg.list
|
||||||
|
fi
|
||||||
|
|
||||||
#Storing vars to config
|
#Storing vars to config
|
||||||
for storeme in phpPoolDir phpPkgName phpMainConf phpFPMService; do
|
for storeme in phpPoolDir phpPkgName phpMainConf phpFPMService phpVerBranch; do
|
||||||
declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/phpvar.list
|
declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/phpvar.list
|
||||||
done
|
done
|
||||||
@@ -24,7 +24,7 @@ fi
|
|||||||
|
|
||||||
#Git-repo
|
#Git-repo
|
||||||
repo=https://git.ictmaatwerk.com/VPS-scripts/Web-V2
|
repo=https://git.ictmaatwerk.com/VPS-scripts/Web-V2
|
||||||
branch=master
|
branch=PHP8-Testing
|
||||||
branchtype=branch #=branch for branch and =tag for release
|
branchtype=branch #=branch for branch and =tag for release
|
||||||
#Installer-config
|
#Installer-config
|
||||||
phpver=7.4
|
phpver=7.4
|
||||||
|
|||||||
Reference in New Issue
Block a user