Changeset 475
- Timestamp:
- Oct 14, 2007, 5:07:14 PM (17 years ago)
- Location:
- locker/deploy/bin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
locker/deploy/bin/gallery2
r127 r475 3 3 use lib '/mit/scripts/deploy/bin'; 4 4 use onserver; 5 use File::Path 5 6 6 7 setup(); 7 8 8 `rm -rf $HOME/scripts-gallery2/$sqldb`; 9 `mkdir -p $HOME/scripts-gallery2/$sqldb`; 9 my $dir = "/mit/$USER/scripts-gallery2/$sqldb"; 10 if (-e $dir) { 11 print STDERR "ERROR: The directory $dir already exists.\nTry selecting a different name."; 12 exit 1; 13 } 14 mkpath($dir); 10 15 11 `patch install/steps/AuthenticateStep.class /mit/scripts/deploy/gallery2.patch`; 16 system('patch', 'install/steps/AuthenticateStep.class', 17 '/mit/scripts/deploy/gallery2.patch'); 12 18 13 `curl -c .cookies http://scripts.mit.edu/~$USER/$addrend/install/index.php 2>/dev/null`; 14 `curl -b .cookies -d "language=en_US" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=1 2>/dev/null`; 15 `curl -b .cookies -d "" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=2 2>/dev/null`; 16 `curl -b .cookies -d "" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=3 2>/dev/null`; 17 `curl -b .cookies -d "isMultisite=0&dir=/mit/$USER/scripts-gallery2/$sqldbcurl&action=save" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=4 2>/dev/null`; 18 `curl -b .cookies -d "isMultisite=0&dir=/mit/$USER/scripts-gallery2/$sqldbcurl&action=save" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=4 2>/dev/null`; 19 $ua->cookie_jar({file => '.cookies'}); 19 20 20 totmp("-d \"type=mysql&hostname=$sqlhost&action=save&confirmReuseTables=&confirmCleanInstall=&username=$sqluser&password=$sqlpass&database=$sqldbcurl&tablePrefix=g2_&columnPrefix=g_\""); 21 fetch_uri('install/index.php'); 22 fetch_uri('install/index.php', {step => 1}, 23 {language => 'en_US'}); 24 fetch_uri('install/index.php', {step => 2}, {}); 25 fetch_uri('install/index.php', {step => 3}, {}); 21 26 22 `curl -b .cookies -K $tmp http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=5 2>/dev/null`; 23 `curl -b .cookies -K $tmp http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=5 2>/dev/null`; 27 my $post4 = {isMultisite => 0, 28 dir => $dir, 29 action => 'save'}; 30 fetch_uri('install/index.php', {step => 4}, $post4); 31 fetch_uri('install/index.php', {step => 4}, $post4); 24 32 25 totmp("-d \"adminName=$admin_username&passwordA=$admin_password&action=create&passwordB=$admin_password&email=$human\@mit.edu&fullName=$USER\""); 33 my $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_'}; 43 fetch_uri('install/index.php', {step => 5}, $post5); 44 fetch_uri('install/index.php', {step => 5}, $post5); 26 45 27 `curl -b .cookies -K $tmp http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=6 2>/dev/null`; 28 `curl -b .cookies -d "" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=7 2>/dev/null`; 29 `curl -b .cookies -d "" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=8 2>/dev/null`; 30 `curl -b .cookies -d "module[imagemagick]=on&activate=1" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=9 2>/dev/null`; 31 `curl -b .cookies -d "" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=10 2>/dev/null`; 32 `curl -b .cookies -d "" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=11 2>/dev/null`; 46 fetch_uri('install/index.php', {step => 6}, 47 {adminName => $admin_username, 48 passwordA => $admin_password, 49 action => 'create', 50 passwordB => $admin_password, 51 email => "$human\@mit.edu", 52 fullName => $USER}); 53 fetch_uri('install/index.php', {step => 7}, {}); 54 fetch_uri('install/index.php', {step => 8}, {}); 55 fetch_uri('install/index.php', {step => 9}, 56 {'module[imagemagick]' => 'on', 57 activate => 1}); 58 fetch_uri('install/index.php', {step => 10}, {}); 59 fetch_uri('install/index.php', {step => 11}, {}); 33 60 34 unlink ".cookies";61 unlink '.cookies'; -
locker/deploy/bin/onserver.pm
r472 r475 25 25 26 26 $ua = LWP::UserAgent->new; 27 push @{$ua->requests_redirectable}, 'POST'; 27 28 28 29 sub fetch_uri {
Note: See TracChangeset
for help on using the changeset viewer.