disable faulty drush site-install; make it so that /var/www/html is a link to /var...
[eostre.git] / Makefile
CommitLineData
1c66ee26 1DATE:=`date --iso-8601`
2
cb4c42ad 3# make sure perms are right, gets called at the end of many routines
4chown-www:
5 chown -R www-data:www-data /var/www
6
1c66ee26 7# recipes for installing this thing onto a "real" (non-chroot) system
cb4c42ad 8setup-real-system: probe-files install-pkgs install-drupal do-mysql chown-www
1c66ee26 9
10# test that we have /install-{drupal-toolchain,packages}.sh /pkgs /sqldefaults and /do-mysql-sh
11# if we don't have all of these files, BAD THINGS may happen
12probe-files:
13 [ -f /install-packages.sh ]
14 [ -f /pkgs ]
15 [ -f /install-drupal-toolchain.sh ]
16 [ -f /do-mysql.sh ]
17 [ -f /sqldefaults ]
18
19install-drupal:
20 chmod +x /install-drupal-toolchain.sh
21 /install-drupal-toolchain.sh
22
23install-pkgs:
24 chmod +x /install-packages.sh
25 /install-packages.sh
26
27do-mysql:
28 chmod +x /do-mysql.sh
29 /do-mysql.sh
30 # secure these two files because they contain passwords in plaintext
31 chmod og-rwx /do-mysql.sh
32 chmod 0600 /sqldefaults
33
cb4c42ad 34# recipes to restore the site from a backup
35install-from-backups: probe-backup-files install-sqldump install-drupal-sites chown-www
36
37probe-backup-files:
38 [ -f /sqldump ]
39 [ -f /sites && -d /sites ]
40
41install-sqldump:
42 # source the dump twice - once to create the DB, once to populate it
43 mysql -u root -p -e 'source /sqldump; source /sqldump'
44
45install-drupal-sites:
46 cd /var/www/html
47 cp -r /sites sites
48
1c66ee26 49# recipes for building a chroot. notice that sql does not cooperate with chroots, due to some funky postinstall hooks and /proc namespaces conflicting
50build-chroot: new-chroot install-pkgs-in-chroot install-drupal-toolchain
51
52new-chroot:
53 rm -rf tristrap
54 mkdir tristrap
55 debootstrap --merged-usr etiona ./tristrap/ http://mirror.fsf.org/trisquel/
56
57install-pkgs-in-chroot:
58 cp files/pkgs tristrap
59 cp files/install-packages.sh tristrap
60 chmod +x tristrap/install-packages.sh
61 chroot tristrap /install-packages.sh
62
63install-drupal-toolchain:
64 cp files/install-drupal-toolchain.sh tristrap
65 chmod +x tristrap/install-drupal-toolchain.sh
66 chroot tristrap /install-drupal-toolchain.sh