Project

General

Profile

Revision a500a624

Added by Julien Enselme over 10 years ago

Add some checks.

View differences:

other-scripts/d7-sync.sh
49 49
ssh assos "drush @$1 sql-dump > $remote_sql_file"
50 50
scp assos:$remote_sql_file .
51 51
mysql -u root -e "DROP DATABASE IF EXISTS $1; CREATE DATABASE $1"
52
ret=$?
53
if [ $ret -ne 0 ] ; then
54
    echo "mysql daemon is not started. Exiting."
55
    ssh assos "rm $remote_sql_file"
56
    exit 1
57
fi
52 58
mysql -u root $1 < $sql_file
53 59
rm $sql_file
54 60
ssh assos "rm $remote_sql_file"
......
57 63
python3 $root/other-scripts/modify-settings.py settings.local.php --baseurl assos.local/$1
58 64

  
59 65
### various drush cmd to finish synchronisation
66
drush status > /dev/null
67
ret=$?
68
if [ $ret -neq 0 ] ; then
69
    echo "drush or site has a problem. Exiting"
70
    exit 1
71
fi
60 72
drush -y dis piwik
61 73
drush -y vset maintenace_mode 0
62 74
drush -y vset error_level 2

Also available in: Unified diff