1 |
469b9d6d
|
Julien Enselme
|
#!/bin/sh
|
2 |
|
|
|
3 |
06e9d071
|
Assos Assos
|
. /home/assos/bin/script-config.sh
|
4 |
|
|
. /home/assos/bin/scripts-utils.sh
|
5 |
469b9d6d
|
Julien Enselme
|
|
6 |
|
|
# This script updates all drupal 7 settings.php according to a new template. Site informations located in settings.local.php are left intact.
|
7 |
|
|
|
8 |
8550e097
|
Julien Enselme
|
for settings in $(find "${d7_dir_sites}" -mindepth 2 -maxdepth 2 -name settings.php); do
|
9 |
469b9d6d
|
Julien Enselme
|
|
10 |
65ce03da
|
Julien Enselme
|
# We go into the settings.php directory.
|
11 |
8550e097
|
Julien Enselme
|
settings_dir=$(give_dir "${settings}")
|
12 |
3e9236bd
|
Julien Enselme
|
cd "${settings_dir}"
|
13 |
469b9d6d
|
Julien Enselme
|
|
14 |
3e9236bd
|
Julien Enselme
|
chmod 700 "${settings}"
|
15 |
|
|
rm "${settings}"
|
16 |
469b9d6d
|
Julien Enselme
|
|
17 |
3e9236bd
|
Julien Enselme
|
cp "${d7_settings}" settings.php
|
18 |
469b9d6d
|
Julien Enselme
|
chmod 400 settings.php
|
19 |
|
|
done |