upgrade grav and php8

This commit is contained in:
meaz 2021-12-11 08:49:25 +01:00
parent b741693b94
commit 34c4d81716
1 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@ WEB_NAME="disroot.lan"
WEB_ROOT="/var/www/"
WWW_USER="www-data"
YAML="/var/www/disroot.lan/user/config/system.yaml"
GRAV_VERSION="1.7.21"
GRAV_VERSION="1.7.24"
# Provisioning actions
apt install dialog
@ -14,7 +14,7 @@ apt install dialog
sudo debconf-set-selections <<< "postfix postfix/main_mailer_type select No configuration"
sudo debconf-set-selections <<< "postfix postfix/mailname string ${WEB_NAME}"
# Add sury repository to sources.list for PHP7.4
# Add sury repository to sources.list for php8.0
echo "set grub-pc/install_devices /dev/sda" | debconf-communicate # Fix grub error
sudo apt-get -y update
sudo apt-get -y dist-upgrade
@ -23,7 +23,7 @@ if ! grep -q "^deb .*sury" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
sudo sh -c 'echo "deb https://packages.sury.org/php/ buster main" > /etc/apt/sources.list.d/php.list'
fi
# Sury Key for PHP7.4
# Sury Key for php8.0
wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add -
sudo apt-get -y update
@ -33,8 +33,8 @@ sudo apt-get install -y nginx-full
echo "Installing composer..."
sudo apt-get install -y composer
echo "Installing php7..."
sudo apt-get install -y php7.4-zip php7.4-cli php7.4-curl php7.4-gd php7.4-mbstring php7.4-xml php7.4-fpm
echo "Installing php8.0..."
sudo apt-get install -y php8.0 php8.0-zip php8.0-cli php8.0-curl php8.0-gd php8.0-mbstring php8.0-xml php8.0-fpm
# Create the Nginx config files and restart webserver
echo "Installing Nginx config files..."
@ -89,13 +89,13 @@ fi
echo "Enter git"
cd "${WEB_ROOT}""${WEB_NAME}"
sudo -u "${WWW_USER}" php7.4 bin/gpm install themer
sudo -u "${WWW_USER}" php8.0 bin/gpm install themer
# https://github.com/sommerregen/grav-plugin-themer
sudo -u "${WWW_USER}" php7.4 bin/gpm install tagcloud
sudo -u "${WWW_USER}" php8.0 bin/gpm install tagcloud
# https://github.com/Perlkonig/grav-plugin-tagcloud
sudo -u "${WWW_USER}" php7.4 bin/gpm install form
sudo -u "${WWW_USER}" php8.0 bin/gpm install form
sudo -u "${WWW_USER}" sed -i 's/quark/disroot/g' "${YAML}"
# Add Grav config (the second extra false should be set to true, but it creates an error in Grav ("Trying to access array offset on value of type null")