Created
May 26, 2019 03:33
-
-
Save pfernandez/ab2098b88686f29500b494b2e9fb87c1 to your computer and use it in GitHub Desktop.
Install (or reinstall) Drupal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Install (or reinstall) Drupal. | |
dir=/var/www/my-website/ | |
files=sites/default/files/ | |
default=sites/default/default.settings.php | |
settings=sites/default/settings.php | |
vendor=vendor/ | |
cd $dir | |
sudo bash -c " | |
rm -rf $files $settings > /dev/null 2>&1 | |
mkdir $files | |
cp $default $settings | |
chmod 775 $files $settings | |
chown root:www-data $files $settings | |
chown -R $USER:$USER $vendor | |
" | |
composer install | |
sudo chown -R root:www-data $vendor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment