From b937aedc300f6fb3f90499ba670dc45e0fa5f7c2 Mon Sep 17 00:00:00 2001 From: sneaK <16104273+sneak-it@users.noreply.github.com> Date: Wed, 24 Nov 2021 10:24:05 -0500 Subject: [PATCH] Add Debian 11 (Bullseye) install script support --- snipeit.sh | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/snipeit.sh b/snipeit.sh index e94cfe018a..97c5441258 100755 --- a/snipeit.sh +++ b/snipeit.sh @@ -374,7 +374,39 @@ done case $distro in debian) - if [[ "$version" =~ ^10 ]]; then + if [[ "$version" =~ ^11 ]]; then + # Install for Debian 11.x + tzone=$(cat /etc/timezone) + + echo "* Adding PHP repository." + log "apt-get install -y apt-transport-https lsb-release ca-certificates" + log "wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg" + echo "deb https://packages.sury.org/php/ $codename main" > /etc/apt/sources.list.d/php.list + + echo -n "* Updating installed packages." + log "apt-get update && apt-get -y upgrade" & pid=$! + progress + + echo "* Installing Apache httpd, PHP, MariaDB and other requirements." + 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." + create_virtualhost + log "a2enmod rewrite" + log "a2ensite $APP_NAME.conf" + rename_default_vhost + + set_hosts + + echo "* Securing MariaDB." + /usr/bin/mysql_secure_installation + + install_snipeit + + echo "* Restarting Apache httpd." + log "service apache2 restart" + elif [[ "$version" =~ ^10 ]]; then # Install for Debian 10.x tzone=$(cat /etc/timezone)