From 6b136e6abc0b03bbd431d18f41c1caab757178e6 Mon Sep 17 00:00:00 2001 From: Daniel434 Date: Sat, 15 Feb 2025 17:59:15 -0400 Subject: [PATCH 1/2] Update PHP version logic in install and uninstall scripts Added php version to php-redis package to prevent it from installing as 8.3 and pulling in 8.3 php dependencies. Also Updated uninstaller to handle Raspbian Bullseye with regards to versioning the php package it is removing. --- install.sh | 6 +++--- uninstall.sh | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 524fa53..aaafe11 100755 --- a/install.sh +++ b/install.sh @@ -103,15 +103,15 @@ version_msg="Unknown Raspbian Version" if [ "$rasp_version" -eq "11" ]; then version_msg="Raspbian 11.0 (Bullseye)" php_version="7.3" - php_package="php${php_version} php${php_version}-cgi php${php_version}-common php${php_version}-cli php${php_version}-fpm php${php_version}-mbstring php${php_version}-mysql php${php_version}-opcache php${php_version}-curl php${php_version}-gd php${php_version}-curl php${php_version}-zip php${php_version}-xml php-redis php${php_version}-dev" + php_package="php${php_version} php${php_version}-cgi php${php_version}-common php${php_version}-cli php${php_version}-fpm php${php_version}-mbstring php${php_version}-mysql php${php_version}-opcache php${php_version}-curl php${php_version}-gd php${php_version}-curl php${php_version}-zip php${php_version}-xml php${php_version}-redis php${php_version}-dev" elif [ "$rasp_version" -eq "10" ]; then version_msg="Raspbian 10.0 (Buster)" php_version="7.3" - php_package="php${php_version} php${php_version}-cgi php${php_version}-common php${php_version}-cli php${php_version}-fpm php${php_version}-mbstring php${php_version}-mysql php${php_version}-opcache php${php_version}-curl php${php_version}-gd php${php_version}-curl php${php_version}-zip php${php_version}-xml php-redis php${php_version}-dev" + php_package="php${php_version} php${php_version}-cgi php${php_version}-common php${php_version}-cli php${php_version}-fpm php${php_version}-mbstring php${php_version}-mysql php${php_version}-opcache php${php_version}-curl php${php_version}-gd php${php_version}-curl php${php_version}-zip php${php_version}-xml php${php_version}-redis php${php_version}-dev" elif [ "$rasp_version" -eq "9" ]; then version_msg="Raspbian 9.0 (Stretch)" php_version="7.3" - php_package="php${php_version} php${php_version}-cgi php${php_version}-common php${php_version}-cli php${php_version}-fpm php${php_version}-mbstring php${php_version}-mysql php${php_version}-opcache php${php_version}-curl php${php_version}-gd php${php_version}-curl php${php_version}-zip php${php_version}-xml php-redis php${php_version}-dev" + php_package="php${php_version} php${php_version}-cgi php${php_version}-common php${php_version}-cli php${php_version}-fpm php${php_version}-mbstring php${php_version}-mysql php${php_version}-opcache php${php_version}-curl php${php_version}-gd php${php_version}-curl php${php_version}-zip php${php_version}-xml php${php_version}-redis php${php_version}-dev" elif [ "$rasp_version" -lt "9" ]; then echo "Raspbian ${rasp_version} is unsupported. Please upgrade." exit 1 diff --git a/uninstall.sh b/uninstall.sh index 4af0359..6c49257 100644 --- a/uninstall.sh +++ b/uninstall.sh @@ -7,6 +7,9 @@ user=$(whoami) # Determine Raspbian version version_msg="Unknown Raspbian Version" +if [ "$rasp_version" -eq "11" ]; then + version_msg="Raspbian 11.0 (Bullseye)" + php_package="php7.3-cgi" if [ "$rasp_version" -eq "10" ]; then version_msg="Raspbian 10.0 (Buster)" php_package="php7.3-cgi" From aecdca63fa310f100e1d1f0919e32c155680fa1c Mon Sep 17 00:00:00 2001 From: Daniel434 Date: Sat, 15 Feb 2025 21:22:33 -0400 Subject: [PATCH 2/2] Update PHP version logic in install and uninstall scripts Corrected minor issue with if statement syntax --- uninstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uninstall.sh b/uninstall.sh index 6c49257..2e99216 100644 --- a/uninstall.sh +++ b/uninstall.sh @@ -10,7 +10,7 @@ version_msg="Unknown Raspbian Version" if [ "$rasp_version" -eq "11" ]; then version_msg="Raspbian 11.0 (Bullseye)" php_package="php7.3-cgi" -if [ "$rasp_version" -eq "10" ]; then +elif [ "$rasp_version" -eq "10" ]; then version_msg="Raspbian 10.0 (Buster)" php_package="php7.3-cgi" elif [ "$rasp_version" -eq "9" ]; then