Script: AlpinePHPTool.sh

Refactored PHP packagelists to set the PHP version when running `AlpinePHPTool.sh` instead of having it set in the pkglist.
This change will deprecate `AlpineUpdatePHPVer.sh` since  only the `NewPHPVer` variable in `AlpinePHPTool.sh`  needs to change the PHP version change
This commit is contained in:
2025-01-09 23:12:18 +01:00
parent b8859801ac
commit bb07d31c83
5 changed files with 4 additions and 14 deletions

View File

@@ -110,6 +110,7 @@ run_Purge() {
#(re)install PHP packages
run_Install() {
sed -i -e "s/phpPHPver/php$NewPHPVer/g" $configStore/php.pkglist
cat $configStore/php.pkglist | xargs apk add
#Configure Php-Fpm
echo ";Placeholder" > /etc/php$NewPHPVer/php-fpm.d/www.conf

View File

@@ -1,11 +0,0 @@
#!/bin/bash
#Vars
#Goto ProjectRoot
cd "$( cd "$( dirname "$0" )" &> /dev/null && pwd )/.."
read -p "Old PHP version (example 82 for 8.2): " OldPHPVer
read -p "New PHP version (example 83 for 8.3): " NewPHPVer
sed -i -e "s/NewPHPVer=$OldPHPVer/NewPHPVer=$NewPHPVer/g" ./Scripts/AlpinePHPTool.sh
find ./CT-Files -name "php.pkglist" | xargs sed -i -e "s/php-fpm$OldPHPVer/php-fpm$NewPHPVer/g" -e "s/php$OldPHPVer/php$NewPHPVer/g"