1 DATE
:=`date --iso-8601`
7 # make sure perms are right, gets called at the end of many routines
9 chown
-R www-data
:www-data
/var
/www
11 # recipes for installing this thing onto a "real" (non-chroot) system
12 # this is enough to get us to a functional Drupal install page
13 # to go further, use the install-from-backups recipe
14 setup-real-system
: probe-files install-pkgs install-drupal do-mysql chown-www
16 # test that we have /install-{drupal-toolchain,packages}.sh /pkgs /sqldefaults and /do-mysql-sh
17 # if we don't have all of these files, BAD THINGS may happen
19 [ -f
/install-packages.sh
]
21 [ -f
/install-drupal-toolchain.sh
]
26 chmod
+x
/install-drupal-toolchain.sh
27 /install-drupal-toolchain.sh
30 chmod
+x
/install-packages.sh
36 # secure these two files because they contain passwords in plaintext
37 chmod og-rwx
/do-mysql.sh
38 chmod
0600 /sqldefaults
40 # recipes to restore the site from a backup
41 install-from-backups
: probe-backup-files install-sqldump install-drupal-sites chown-www
48 # source the dump twice - once to create the DB, once to populate it
49 mysql
-u root
-p
-e
'source /sqldump; use dbd_drupal; source /sqldump;'
55 # recipes for building a chroot. notice that sql does not cooperate with chroots, due to some funky postinstall hooks and /proc namespaces conflicting
56 build-chroot
: new-chroot install-pkgs-in-chroot install-drupal-toolchain
61 debootstrap
--merged-usr etiona .
/tristrap
/ http
://mirror.fsf.org
/trisquel
/
63 install-pkgs-in-chroot
:
64 cp files
/pkgs tristrap
65 cp files
/install-packages.sh tristrap
66 chmod
+x tristrap
/install-packages.sh
67 chroot tristrap
/install-packages.sh
69 install-drupal-toolchain
:
70 cp files
/install-drupal-toolchain.sh tristrap
71 chmod
+x tristrap
/install-drupal-toolchain.sh
72 chroot tristrap
/install-drupal-toolchain.sh