From ee8e84029ae7cd084a888f3b1dee64913333a114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Rie=C3=9F?= Date: Sun, 25 Aug 2024 15:09:22 +0200 Subject: [PATCH 1/2] added Raspbian 12 (Bookworm) --- install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 524fa53..22ff774 100755 --- a/install.sh +++ b/install.sh @@ -100,7 +100,11 @@ function log_warning() { # Determine Raspbian version version_msg="Unknown Raspbian Version" -if [ "$rasp_version" -eq "11" ]; then +if [ "$rasp_version" -eq "12" ]; then + version_msg="Raspbian 12.0 (Bookworm)" + php_version="8.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" +elif [ "$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" From bb3a756a60606bd3afb56eedf2fe3873bdd99267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Rie=C3=9F?= Date: Sun, 25 Aug 2024 16:02:01 +0200 Subject: [PATCH 2/2] check if RPi.gpio is installed in system already --- install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 22ff774..d04300c 100755 --- a/install.sh +++ b/install.sh @@ -229,7 +229,12 @@ function installDependencies() echo "Main Depepencies Successfully Installed" fi sudo apt-get install ffmpeg -y --fix-missing || log_error "Unable to install ffmpeg" - sudo pip3 install RPi.GPIO || log_error "Unable to install pip3 packages" + #check in RPI.GPIO is already installed system-wide + if [[ $(dpkg-query -l python3-rpi.gpio | grep python3-rpi.gpio | cut -c1-2) == ii* ]]; then + echo "RPi.GPIO already installed system-wide" + else + sudo pip3 install RPi.GPIO || log_error "Unable to install pip3 packages" + fi if [ -f "/usr/local/bin/composer" ]; then log_info "Composer already installed!" else