From: eostre Date: Thu, 30 Jul 2020 19:29:59 +0000 (-0400) Subject: disable faulty drush site-install; make it so that /var/www/html is a link to /var... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c05721c77c24b96c8081e390f79a06ee77f27e16;p=eostre.git disable faulty drush site-install; make it so that /var/www/html is a link to /var/www/drupal-7.* --- diff --git a/files/do-mysql.sh b/files/do-mysql.sh index 8fb5ae2..350650d 100644 --- a/files/do-mysql.sh +++ b/files/do-mysql.sh @@ -1,6 +1,6 @@ #!/bin/bash -xe -DRUPAL_DB_PASSWORD="please change me" +DRUPAL_DB_PASSWORD="H0z7WC8Xq8yRE" # install the mysql server apt install -y mariadb-server ||: @@ -12,12 +12,12 @@ apt install -y mariadb-server ||: mysql_secure_installation < /sqldefaults # add the drupal db -mysql -u root -p -e 'CREATE DATABASE drupal CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;' -mysql -u root -p -e "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON drupal.* TO 'drupaluser'@'localhost' IDENTIFIED BY '$DRUPAL_DB_PASSWORD';" +mysql -u root -p -e 'CREATE DATABASE dbd_drupal CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;' +mysql -u root -p -e "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON dbd_drupal.* TO 'w_dbd'@'localhost' IDENTIFIED BY '$DRUPAL_DB_PASSWORD';" -# and have drupal do the site-install -cd /var/www/html -vendor/bin/drush site-install --db-url=mysql://drupaluser:$DRUPAL_DB_PASSWORD@localhost/drupal +## and have drupal do the site-install +#cd /var/www/html +#vendor/bin/drush site-install --db-url=mysql://drupaluser:$DRUPAL_DB_PASSWORD@localhost/drupal # make sure perms are right chown -R www-data:www-data /var/www/html diff --git a/files/install-drupal-toolchain.sh b/files/install-drupal-toolchain.sh index d9d0045..c8850ae 100644 --- a/files/install-drupal-toolchain.sh +++ b/files/install-drupal-toolchain.sh @@ -5,12 +5,16 @@ curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer # use composer to install drush7 and the drush launcher -cd /var/www/html +cd /var/www composer require drush/drush:8.* wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/latest/download/drush.phar chmod +x drush.phar mv drush.phar /usr/local/bin/drush # use vendor/bin/drush to download drupal -cd /var/www/html +cd /var/www vendor/bin/drush dl drupal-7 + +# make drupal our webroot +mv html html-stock +ln -s drupal-7* html