forked from wunderio/WunderTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sync.sh
executable file
·54 lines (41 loc) · 1.95 KB
/
sync.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh
# This file will sync local development environment with the dev server
# SQL from the server + rsync.
drush -vvvv sql-sync @site.prod @site.local --structure-tables-list=cache,cache_*,history,search_*,sessions,watchdog --sanitize
echo 'SQL sync ready.';
#drush rsync @site.prod:%files/ drupal/files/
#echo 'RSync ready.';
# Set UID1 password to 'root'
#drush @site.local sqlq "UPDATE users SET name = 'root' WHERE name = 'admin'"
drush @site.local sqlq "UPDATE users SET mail = '[email protected]' WHERE name != 'admin'"
drush @site.local sqlq "UPDATE users SET init = '' WHERE name != 'admin'"
drush @site.local sqlq "UPDATE users SET pass = '' WHERE name != 'admin'"
drush @site.local upwd admin --password=admin
echo 'Truncated emails and passwords from the database.';
# Download Devel
drush @site.local dl devel -y;
# Download maillog to prevent emails being sent
#drush @site.local dl maillog -y;
# Set maillog default development environment settings
#drush @site.local vset maillog_devel 1;
#drush @site.local vset maillog_log 1;
#drush @site.local vset maillog_send 0;
# Enable Devel and UI modules
drush @site.local en field_ui devel views_ui context_ui feeds_ui rules_admin dblog --yes;
echo 'Enabled Devel and Views+Context+Feeds+Rules UI modules.';
# Disable google analytics
# drush @site.local dis googleanalytics --yes;
# echo 'Disabled Google Analytics.';
# Set site email address to [email protected]
#drush @site.local vset site_mail "[email protected]"
# Set imagemagick convert path
# drush @site.local vset imagemagick_convert "/opt/local/bin/convert"
#Enable stage file proxy
drush @site.local pm-download stage_file_proxy;
drush @site.local pm-enable --yes stage_file_proxy;
drush @site.local variable-set stage_file_proxy_origin "https://www.siteknits.com";
echo "Enabled stage file proxy so you won't need the files locally, jeee!"
# Clear caches
drush @site.local cache-clear all;
# FINISH HIM
#say --voice=Zarvox "Sync is now fully completed."