Project

General

Profile

Revision edeafe5e

Added by Julien Enselme over 10 years ago

Solves permission and base_url problems.

View differences:

other-scripts/d7-sync.sh
8 8
If a sitename is provided, the script will sync the drupal installation and the sites'
9 9
folders and database. Othewise, only the drupal installation is synched.
10 10

  
11
You must launch this script at the root of the drupal instance.
11
TODO: improve chmod on files.
12 12
EOF
13 13

  
14 14
### Init
......
69 69

  
70 70
### modify settings.php
71 71
if [ $1 = 'default' ] ; then
72
    base_url=$DOMAIN
72
    base_url=http://$DOMAIN
73 73
else
74
    base_url=$DOMAIN/$1
74
    base_url=http://$DOMAIN/$1
75 75
fi
76 76
python3 $DIR_MULTIASSOS/other-scripts/modify-settings.py settings.local.php --baseurl $base_url
77
chmod 666 *.php
77 78

  
78 79
### Modify sites.php
79 80
sed "s/\['assos.centrale-marseille.fr[a-b1-9]*/['$DOMAIN/g" < $SITES_PHP > $SITES_PHP.tmp
......
83 84
### various drush cmd to finish synchronisation
84 85
drush status > /dev/null
85 86
ret=$?
86
if [ $ret -neq 0 ] ; then
87
if [ $ret -ne 0 ] ; then
87 88
    echo "drush or site has a problem. Exiting"
88 89
    exit 1
89 90
fi

Also available in: Unified diff