From 785b1ad5a66917e26ba29208155b3368755c7a96 Mon Sep 17 00:00:00 2001 From: theburger Date: Thu, 15 Apr 2021 01:22:31 +0800 Subject: [PATCH] Update snipeit.sh php version from 7.1 to 7.4 (#9407) Snipe-it 5.2.x is required PHP 7.4 or above, update script to install PHP 7.4 instead of 7.1 ## Changed - PHP to install in script is changed to 7.4 from 7.1 - Add `''`at DB_PASSWORD when configuring `.env` file --- snipeit.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/snipeit.sh b/snipeit.sh index 76b784c052..e94cfe018a 100755 --- a/snipeit.sh +++ b/snipeit.sh @@ -211,7 +211,7 @@ install_snipeit () { sed -i "s|^\\(DB_HOST=\\).*|\\1localhost|" "$APP_PATH/.env" sed -i "s|^\\(DB_DATABASE=\\).*|\\1snipeit|" "$APP_PATH/.env" sed -i "s|^\\(DB_USERNAME=\\).*|\\1snipeit|" "$APP_PATH/.env" - sed -i "s|^\\(DB_PASSWORD=\\).*|\\1$mysqluserpw|" "$APP_PATH/.env" + sed -i "s|^\\(DB_PASSWORD=\\).*|\\1'$mysqluserpw'|" "$APP_PATH/.env" sed -i "s|^\\(APP_URL=\\).*|\\1http://$fqdn|" "$APP_PATH/.env" echo "* Installing composer." @@ -420,7 +420,7 @@ case $distro in progress echo "* Installing Apache httpd, PHP, MariaDB and other requirements." - PACKAGES="mariadb-server mariadb-client apache2 libapache2-mod-php7.1 php7.1 php7.1-mcrypt php7.1-curl php7.1-mysql php7.1-gd php7.1-ldap php7.1-zip php7.1-mbstring php7.1-xml php7.1-bcmath curl git unzip" + PACKAGES="mariadb-server mariadb-client apache2 libapache2-mod-php7.4 php7.4 php7.4-mcrypt php7.4-curl php7.4-mysql php7.4-gd php7.4-ldap php7.4-zip php7.4-mbstring php7.4-xml php7.4-bcmath curl git unzip" install_packages echo "* Configuring Apache." @@ -454,7 +454,7 @@ case $distro in progress echo "* Installing Apache httpd, PHP, MariaDB and other requirements." - PACKAGES="mariadb-server mariadb-client php7.1 php7.1-mcrypt php7.1-curl php7.1-mysql php7.1-gd php7.1-ldap php7.1-zip php7.1-mbstring php7.1-xml php7.1-bcmath curl git unzip" + PACKAGES="mariadb-server mariadb-client php7.4 php7.4-mcrypt php7.4-curl php7.4-mysql php7.4-gd php7.4-ldap php7.4-zip php7.4-mbstring php7.4-xml php7.4-bcmath curl git unzip" install_packages echo "* Configuring Apache." @@ -525,7 +525,7 @@ case $distro in progress echo "* Installing Apache httpd, PHP, MariaDB and other requirements." - PACKAGES="mariadb-server mariadb-client apache2 libapache2-mod-php7.1 php7.1 php7.1-mcrypt php7.1-curl php7.1-mysql php7.1-gd php7.1-ldap php7.1-zip php7.1-mbstring php7.1-xml php7.1-bcmath curl git unzip" + PACKAGES="mariadb-server mariadb-client apache2 libapache2-mod-php7.4 php7.4 php7.4-mcrypt php7.4-curl php7.4-mysql php7.4-gd php7.4-ldap php7.4-zip php7.4-mbstring php7.4-xml php7.4-bcmath curl git unzip" install_packages echo "* Configuring Apache." @@ -562,7 +562,7 @@ case $distro in progress echo "* Installing Apache httpd, PHP, MariaDB and other requirements." - PACKAGES="mariadb-server mariadb-client php7.1 php7.1-mcrypt php7.1-curl php7.1-mysql php7.1-gd php7.1-ldap php7.1-zip php7.1-mbstring php7.1-xml php7.1-bcmath curl git unzip" + PACKAGES="mariadb-server mariadb-client php7.4 php7.4-mcrypt php7.4-curl php7.4-mysql php7.4-gd php7.4-ldap php7.4-zip php7.4-mbstring php7.4-xml php7.4-bcmath curl git unzip" install_packages echo "* Configuring Apache." @@ -590,7 +590,7 @@ case $distro in fi ;; raspbian) - if [[ "$version" =~ ^9 ]]; then + if [[ "$version" =~ ^10 ]]; then # Install for Raspbian 9.x tzone=$(cat /etc/timezone) cat >/etc/apt/sources.list.d/10-buster.list <