add scripts for x11vnc and techy.sh
[eostre.git] / dbd-autobuild / 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
4151bec2 8# this is enough to get us to a functional Drupal install page
9# to go further, use the install-from-backups recipe
cb4c42ad 10setup-real-system: probe-files install-pkgs install-drupal do-mysql chown-www
1c66ee26 11
12# test that we have /install-{drupal-toolchain,packages}.sh /pkgs /sqldefaults and /do-mysql-sh
13# if we don't have all of these files, BAD THINGS may happen
14probe-files:
15 [ -f /install-packages.sh ]
16 [ -f /pkgs ]
17 [ -f /install-drupal-toolchain.sh ]
18 [ -f /do-mysql.sh ]
19 [ -f /sqldefaults ]
20
21install-drupal:
22 chmod +x /install-drupal-toolchain.sh
23 /install-drupal-toolchain.sh
24
25install-pkgs:
26 chmod +x /install-packages.sh
27 /install-packages.sh
28
29do-mysql:
30 chmod +x /do-mysql.sh
31 /do-mysql.sh
32 # secure these two files because they contain passwords in plaintext
33 chmod og-rwx /do-mysql.sh
34 chmod 0600 /sqldefaults
35
cb4c42ad 36# recipes to restore the site from a backup
37install-from-backups: probe-backup-files install-sqldump install-drupal-sites chown-www
38
39probe-backup-files:
40 [ -f /sqldump ]
4151bec2 41 [ -d /sites ]
cb4c42ad 42
43install-sqldump:
44 # source the dump twice - once to create the DB, once to populate it
4151bec2 45 mysql -u root -p -e 'source /sqldump; use dbd_drupal; source /sqldump;'
cb4c42ad 46
47install-drupal-sites:
48 cd /var/www/html
49 cp -r /sites sites
50
1c66ee26 51# recipes for building a chroot. notice that sql does not cooperate with chroots, due to some funky postinstall hooks and /proc namespaces conflicting
52build-chroot: new-chroot install-pkgs-in-chroot install-drupal-toolchain
53
54new-chroot:
55 rm -rf tristrap
56 mkdir tristrap
57 debootstrap --merged-usr etiona ./tristrap/ http://mirror.fsf.org/trisquel/
58
59install-pkgs-in-chroot:
60 cp files/pkgs tristrap
61 cp files/install-packages.sh tristrap
62 chmod +x tristrap/install-packages.sh
63 chroot tristrap /install-packages.sh
64
65install-drupal-toolchain:
66 cp files/install-drupal-toolchain.sh tristrap
67 chmod +x tristrap/install-drupal-toolchain.sh
68 chroot tristrap /install-drupal-toolchain.sh