source: trunk/locker/deploy/bin/gallery2 @ 1215

Last change on this file since 1215 was 1116, checked in by mitchb, 13 years ago
Fix Gallery2 autoinstaller. Don't have separate star/non-star versions. The new version, when updated to use *.scripts, was creating ~locker/scripts-gallery2-star directories, and the onserver code was expecting to write into ~locker/scripts-gallery2. This silently worked for people who had a previous Gallery2 autoinstall, but was broken for anyone else. Good thing I didn't blog about it... totally not as bad as what happened when we advertised Django.
  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#!/usr/bin/perl
2use strict;
3use lib '/mit/scripts/deploy/bin';
4use onserver_star;
5use File::Path
6
7setup();
8
9my $dir = "/mit/$USER/scripts-gallery2/$sqldb";
10if (-e $dir) {
11    print STDERR "ERROR: The directory $dir already exists.\nTry selecting a different name.";
12    exit 1;
13}
14mkpath($dir);
15
16system("patch", "install/steps/AuthenticateStep.class",
17       "/mit/scripts/deploy$scriptsdev/gallery2.patch");
18
19$ua->cookie_jar({file => '.cookies'});
20
21fetch_uri('install/index.php');
22fetch_uri('install/index.php', {step => 1},
23          {language => 'en_US'});
24fetch_uri('install/index.php', {step => 2}, {});
25fetch_uri('install/index.php', {step => 3}, {});
26
27my $post4 = {isMultisite => 0,
28            dir => $dir,
29            action => 'save'};
30fetch_uri('install/index.php', {step => 4}, $post4);
31fetch_uri('install/index.php', {step => 4}, $post4);
32
33my $post5 = {type => 'mysql',
34             hostname => $sqlhost,
35             action => 'save',
36             confirmReuseTables => '',
37             confirmCleanInstall => '',
38             username => $sqluser,
39             password => $sqlpass,
40             database => $sqldb,
41             tablePrefix => 'g2_',
42             columnPrefix => 'g_'};
43fetch_uri('install/index.php', {step => 5}, $post5);
44fetch_uri('install/index.php', {step => 5}, $post5);
45
46fetch_uri('install/index.php', {step => 6},
47          {adminName => $admin_username,
48           passwordA => $admin_password,
49           action => 'create',
50           passwordB => $admin_password,
51           email => $email,
52           fullName => $USER});
53fetch_uri('install/index.php', {step => 7}, {});
54fetch_uri('install/index.php', {step => 8}, {});
55fetch_uri('install/index.php', {step => 9},
56          {'module[imagemagick]' => 'on',
57           activate => 1});
58fetch_uri('install/index.php', {step => 10}, {});
59fetch_uri('install/index.php', {step => 11}, {});
60
61unlink '.cookies';
Note: See TracBrowser for help on using the repository browser.