1 DATE
:=`date --iso-8601`
3 # make sure perms are right, gets called at the end of many routines
5 chown
-R www-data
:www-data
/var
/www
7 # recipes for installing this thing onto a "real" (non-chroot) system
8 # this is enough to get us to a functional Drupal install page
9 # to go further, use the install-from-backups recipe
10 setup-real-system
: probe-files install-pkgs install-drupal do-mysql chown-www
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
15 [ -f
/install-packages.sh
]
17 [ -f
/install-drupal-toolchain.sh
]
22 chmod
+x
/install-drupal-toolchain.sh
23 /install-drupal-toolchain.sh
26 chmod
+x
/install-packages.sh
32 # secure these two files because they contain passwords in plaintext
33 chmod og-rwx
/do-mysql.sh
34 chmod
0600 /sqldefaults
36 # recipes to restore the site from a backup
37 install-from-backups
: probe-backup-files install-sqldump install-drupal-sites chown-www
42 # [ -f /boycottsony.org.conf ]
43 # [ -f /dayagainstdrm.org.conf ]
44 # [ -f /rotten-apple.org.conf ]
45 # [ -f /defectivebydesign.org.conf ]
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 #install-apache-sites-conf:
56 # cp /*.conf /etc/apache2/sites-available/
57 # a2ensite boycottsony.org
58 # a2ensite dayagainstdrm.org
59 # a2ensite rotten-apple.org
60 # a2ensite www.defectivebydesign.org
61 # systemctl reload apache2
63 # recipes for building a chroot. notice that sql does not cooperate with chroots, due to some funky postinstall hooks and /proc namespaces conflicting
64 build-chroot
: new-chroot install-pkgs-in-chroot install-drupal-toolchain
69 debootstrap
--merged-usr etiona .
/tristrap
/ http
://mirror.fsf.org
/trisquel
/
71 install-pkgs-in-chroot
:
72 cp files
/pkgs tristrap
73 cp files
/install-packages.sh tristrap
74 chmod
+x tristrap
/install-packages.sh
75 chroot tristrap
/install-packages.sh
77 install-drupal-toolchain
:
78 cp files
/install-drupal-toolchain.sh tristrap
79 chmod
+x tristrap
/install-drupal-toolchain.sh
80 chroot tristrap
/install-drupal-toolchain.sh