Updated php module to support mutiple php versions
This commit is contained in:
@@ -15,8 +15,25 @@ elif [ "$shortdist" = "el8" ]; then
|
||||
mkdir -p /var/run/php
|
||||
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/generic.php"$phpVerBranch".php.pkg.list; then
|
||||
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/php-fpm/generic.phppkg.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/"$PKGLIST".phppkg.list
|
||||
printf " " >>/tmp/pkg.list
|
||||
fi
|
||||
|
||||
#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
|
||||
done
|
||||
Reference in New Issue
Block a user