Project

General

Profile

Revision fdbc8338

Added by Julien Enselme over 10 years ago

Base url and perms are correct.

Need to improve permissions. The sites.php is not handled properly.

View differences:

other-scripts/d7-sync.sh
11 11
You must launch this script at the root of the drupal instance.
12 12
EOF
13 13

  
14
# sync drupal tree
14
### sync drupal tree
15 15
git pull --rebase
16 16

  
17
# sync files
17
### sync files
18 18
if [ -z "$1" ] ; then
19 19
    exit 0
20 20
fi
21 21

  
22 22
root=$(pwd)
23 23
cd htmltest/sites
24

  
25
ret=$?
26
if [ $ret -ne 0 ] ; then
27
    echo 'Not in the right directory. Exiting.'
28
    exit 1
29
fi
30

  
24 31
if [ $1 = default ] ; then
25 32
    dir_site=$1
26 33
else
......
29 36
mkdir $dir_site
30 37
cd $dir_site
31 38
rsync -rl --progress assos:~/htmltest/sites/$dir_site/* .
39
# Change permissions for Apache
40
# TODO: do something less permissive than 755
41
chmod -R 755 .
42
chmod -R 777 files
43

  
32 44

  
33
# sync databases
45
### sync databases
34 46
now=$(date +%s)
35 47
sql_file="$1.$now.sql"
36 48
remote_sql_file="~/tmp/$sql_file"
......
41 53
rm $sql_file
42 54
ssh assos "rm $remote_sql_file"
43 55

  
44
# modify settings.php
45
python3 $root/other-scripts/modify-settings.py settings.local.php
56
### modify settings.php
57
python3 $root/other-scripts/modify-settings.py settings.local.php --baseurl assos.local/$1
46 58

  
47
# various drush cmd to finish synchronisation
59
### various drush cmd to finish synchronisation
48 60
drush -y dis piwik
49 61
drush -y vset maintenace_mode 0
50 62
drush -y vset error_level 2

Also available in: Unified diff