1
|
#!/bin/sh
|
2
|
|
3
|
. /home/assos/bin/script-config.sh
|
4
|
. /home/assos/bin/scripts-utils.sh
|
5
|
|
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
|
for settings in $(find "${d7_dir_sites}" -mindepth 2 -maxdepth 2 -name settings.php); do
|
9
|
|
10
|
# We go into the settings.php directory.
|
11
|
settings_dir=$(give_dir "${settings}")
|
12
|
cd "${settings_dir}"
|
13
|
|
14
|
chmod 700 "${settings}"
|
15
|
rm "${settings}"
|
16
|
|
17
|
cp "${d7_settings}" settings.php
|
18
|
chmod 400 settings.php
|
19
|
done
|