source: locker/deploy/bin/gallery2 @ 988

Last change on this file since 988 was 476, checked in by andersk, 17 years ago
Add $email variable.
  • 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;
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/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.