forked from Disroot/Howto
fix error with grub in vagrant + with php version + minor things
This commit is contained in:
parent
7c9cc5788b
commit
64b9ec1bfc
1 changed files with 15 additions and 10 deletions
|
@ -13,12 +13,13 @@ GRAV_VERSION="1.6.18"
|
||||||
sudo debconf-set-selections <<< "postfix postfix/main_mailer_type select No configuration"
|
sudo debconf-set-selections <<< "postfix postfix/main_mailer_type select No configuration"
|
||||||
sudo debconf-set-selections <<< "postfix postfix/mailname string ${WEB_NAME}"
|
sudo debconf-set-selections <<< "postfix postfix/mailname string ${WEB_NAME}"
|
||||||
|
|
||||||
# Add sury repository to sources.list for PHP
|
# Add sury repository to sources.list for PHP7.4
|
||||||
|
echo "set grub-pc/install_devices /dev/sda" | debconf-communicate # Fix grub error
|
||||||
sudo apt-get -y update
|
sudo apt-get -y update
|
||||||
sudo apt-get -y upgrade
|
sudo apt-get -y dist-upgrade
|
||||||
sudo apt-get -y install ca-certificates apt-transport-https
|
sudo apt-get -y install ca-certificates apt-transport-https
|
||||||
if ! grep -q "^deb .*sury" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
|
if ! grep -q "^deb .*sury" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
|
||||||
echo "deb https://packages.sury.org/php/ buster main" | sudo tee -a /etc/apt/sources.list.d/php.list
|
sudo sh -c 'echo "deb https://packages.sury.org/php/ buster main" > /etc/apt/sources.list.d/php.list'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Sury Key for PHP7.4
|
# Sury Key for PHP7.4
|
||||||
|
@ -37,8 +38,12 @@ sudo apt-get install -y php7.4-zip php7.4-cli php7.4-curl php7.4-gd php7.4-mbstr
|
||||||
# Create the Nginx config files and restart webserver
|
# Create the Nginx config files and restart webserver
|
||||||
echo "Installing Nginx config files..."
|
echo "Installing Nginx config files..."
|
||||||
sudo rsync -cr /vagrant/provision/etc/nginx/sites-available /etc/nginx/
|
sudo rsync -cr /vagrant/provision/etc/nginx/sites-available /etc/nginx/
|
||||||
sudo ln -s /etc/nginx/sites-available/"${WEB_NAME}".conf /etc/nginx/sites-enabled/"${WEB_NAME}".conf
|
if [ ! -f /etc/nginx/sites-enabled/"${WEB_NAME}".conf ]; then
|
||||||
sudo rm /etc/nginx/sites-enabled/default
|
sudo ln -s /etc/nginx/sites-available/"${WEB_NAME}".conf /etc/nginx/sites-enabled/"${WEB_NAME}".conf
|
||||||
|
fi
|
||||||
|
if [ -f /etc/nginx/sites-enabled/default ]; then
|
||||||
|
sudo rm /etc/nginx/sites-enabled/default
|
||||||
|
fi
|
||||||
sudo service nginx restart
|
sudo service nginx restart
|
||||||
|
|
||||||
# Install GRAV in webroot
|
# Install GRAV in webroot
|
||||||
|
@ -81,11 +86,11 @@ fi
|
||||||
echo "Enter git"
|
echo "Enter git"
|
||||||
cd "${WEB_ROOT}""${WEB_NAME}"
|
cd "${WEB_ROOT}""${WEB_NAME}"
|
||||||
|
|
||||||
sudo -u "${WWW_USER}" bin/gpm install form
|
sudo -u "${WWW_USER}" php7.4 bin/gpm install form
|
||||||
sudo -u "${WWW_USER}" bin/gpm install simplesearch
|
sudo -u "${WWW_USER}" php7.4 bin/gpm install simplesearch
|
||||||
sudo -u "${WWW_USER}" bin/gpm install relatedpages
|
sudo -u "${WWW_USER}" php7.4 bin/gpm install relatedpages
|
||||||
sudo -u "${WWW_USER}" bin/gpm install breadcrumbs
|
sudo -u "${WWW_USER}" php7.4 bin/gpm install breadcrumbs
|
||||||
sudo -u "${WWW_USER}" bin/gpm install page-toc
|
sudo -u "${WWW_USER}" php7.4 bin/gpm install page-toc
|
||||||
sudo -u "${WWW_USER}" sed -i 's/quark/grav-theme-howto/g' "${YAML}"
|
sudo -u "${WWW_USER}" sed -i 's/quark/grav-theme-howto/g' "${YAML}"
|
||||||
|
|
||||||
# Add Grav config
|
# Add Grav config
|
||||||
|
|
Loading…
Reference in a new issue