aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-02-07 20:04:02 -0200
committerSilvio Rhatto <rhatto@riseup.net>2018-02-07 20:04:02 -0200
commitc504db5fd016222db13cd6493d95ecd94e3d1994 (patch)
treef1caea42a2003f14d53854ca21ba8333cf411908 /share
parent9a090b17af7a4b9bd67a45b1b363de0e9d1041cc (diff)
downloadtemplater-c504db5fd016222db13cd6493d95ecd94e3d1994.tar.gz
templater-c504db5fd016222db13cd6493d95ecd94e3d1994.tar.bz2
Drupal: setup settings.local.php
Diffstat (limited to 'share')
-rw-r--r--share/templater/drupal7/files/default.settings.php14
-rw-r--r--share/templater/drupal7/files/settings.local.php1
-rwxr-xr-xshare/templater/drupal7/setup13
-rw-r--r--share/templater/drupal8/files/default.settings.php29
-rw-r--r--share/templater/drupal8/files/settings.local.php1
-rwxr-xr-xshare/templater/drupal8/setup15
6 files changed, 49 insertions, 24 deletions
diff --git a/share/templater/drupal7/files/default.settings.php b/share/templater/drupal7/files/default.settings.php
index a0b8a36..283c353 100644
--- a/share/templater/drupal7/files/default.settings.php
+++ b/share/templater/drupal7/files/default.settings.php
@@ -636,3 +636,17 @@ $databases['default']['default'] = array(
'host' => 'localhost',
'prefix' => '',
);
+
+/**
+ * Load local development override configuration, if available.
+ *
+ * Use settings.local.php to override variables on secondary (staging,
+ * development, etc) installations of this site. Typically used to disable
+ * caching, JavaScript/CSS compression, re-routing of outgoing emails, and
+ * other things that should not happen on development and testing sites.
+ *
+ * Keep this code block at the end of this file to take full effect.
+ */
+if (file_exists(__DIR__ . '/settings.local.php')) {
+ include __DIR__ . '/settings.local.php';
+}
diff --git a/share/templater/drupal7/files/settings.local.php b/share/templater/drupal7/files/settings.local.php
new file mode 100644
index 0000000..5f4746f
--- /dev/null
+++ b/share/templater/drupal7/files/settings.local.php
@@ -0,0 +1 @@
+<?php // Put your local customizations here
diff --git a/share/templater/drupal7/setup b/share/templater/drupal7/setup
index 70ebe07..ce38946 100755
--- a/share/templater/drupal7/setup
+++ b/share/templater/drupal7/setup
@@ -15,10 +15,11 @@ function templater_drupal7 {
templater_echo "Setting up Drupal 7..."
if [ ! -e ".gitignore" ] || ! grep -q "^settings.php" .gitignore; then
- echo settings.php >> .gitignore
- echo settings.prod.php >> .gitignore
- echo files >> .gitignore
- echo sql >> .gitignore
+ echo settings.php >> .gitignore
+ echo settings.local.php >> .gitignore
+ echo settings.prod.php >> .gitignore
+ echo files >> .gitignore
+ echo sql >> .gitignore
fi
if [ ! -e "settings.dev.php" ]; then
@@ -28,6 +29,10 @@ function templater_drupal7 {
ln -sf settings.dev.php settings.php
+ if [ ! -e "settings.local.php" ]; then
+ cp $SHARE/drupal7/files/settings.local.php settings.local.php
+ fi
+
templater_install_makefile $SHARE/drupal7/files/Makefile.drupal7
if [ ! -e "drupal.make.yml" ]; then
diff --git a/share/templater/drupal8/files/default.settings.php b/share/templater/drupal8/files/default.settings.php
index bf3bd20..59afc6c 100644
--- a/share/templater/drupal8/files/default.settings.php
+++ b/share/templater/drupal8/files/default.settings.php
@@ -771,21 +771,6 @@ $settings['file_scan_ignore_directories'] = [
$settings['entity_update_batch_size'] = 50;
/**
- * Load local development override configuration, if available.
- *
- * Use settings.local.php to override variables on secondary (staging,
- * development, etc) installations of this site. Typically used to disable
- * caching, JavaScript/CSS compression, re-routing of outgoing emails, and
- * other things that should not happen on development and testing sites.
- *
- * Keep this code block at the end of this file to take full effect.
- */
-#
-# if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
-# include $app_root . '/' . $site_path . '/settings.local.php';
-# }
-
-/**
* Basic config set by templater - https://templater.fluxo.info
*/
$databases['default']['default'] = array (
@@ -803,3 +788,17 @@ $config_directories['sync'] = 'sites/default/config/sync';
$settings['trusted_host_patterns'] = array(
'^localhost$',
);
+
+/**
+ * Load local development override configuration, if available.
+ *
+ * Use settings.local.php to override variables on secondary (staging,
+ * development, etc) installations of this site. Typically used to disable
+ * caching, JavaScript/CSS compression, re-routing of outgoing emails, and
+ * other things that should not happen on development and testing sites.
+ *
+ * Keep this code block at the end of this file to take full effect.
+ */
+if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
+ include $app_root . '/' . $site_path . '/settings.local.php';
+}
diff --git a/share/templater/drupal8/files/settings.local.php b/share/templater/drupal8/files/settings.local.php
new file mode 100644
index 0000000..5f4746f
--- /dev/null
+++ b/share/templater/drupal8/files/settings.local.php
@@ -0,0 +1 @@
+<?php // Put your local customizations here
diff --git a/share/templater/drupal8/setup b/share/templater/drupal8/setup
index 85f0b7f..d99489f 100755
--- a/share/templater/drupal8/setup
+++ b/share/templater/drupal8/setup
@@ -15,11 +15,12 @@ function templater_drupal8 {
templater_echo "Setting up Drupal 8..."
if [ ! -e ".gitignore" ] || ! grep -q "^settings.php" .gitignore; then
- echo settings.php >> .gitignore
- echo settings.prod.php >> .gitignore
- echo services.yml >> .gitignore
- echo files >> .gitignore
- echo sql >> .gitignore
+ echo settings.php >> .gitignore
+ echo settings.local.php >> .gitignore
+ echo settings.prod.php >> .gitignore
+ echo services.yml >> .gitignore
+ echo files >> .gitignore
+ echo sql >> .gitignore
fi
if [ ! -e "settings.dev.php" ]; then
@@ -29,6 +30,10 @@ function templater_drupal8 {
ln -sf settings.dev.php settings.php
+ if [ ! -e "settings.local.php" ]; then
+ cp $SHARE/drupal7/files/settings.local.php settings.local.php
+ fi
+
if [ ! -e "services.yml" ]; then
cp $SHARE/drupal8/files/default.services.yml services.dev.yml
#cp $SHARE/drupal8/files/default.services.yml .