Last change
on this file since 796 was
743,
checked in by njess, 16 years ago
|
Updated wordpress installer for 2.5.1
|
-
Property svn:executable set to
*
|
File size:
1.0 KB
|
Rev | Line | |
---|
[127] | 1 | #!/usr/bin/perl |
---|
| 2 | use strict; |
---|
[469] | 3 | use lib '/mit/scripts/deploy/bin'; |
---|
[127] | 4 | use onserver; |
---|
[725] | 5 | use DBI; |
---|
[127] | 6 | |
---|
| 7 | setup(); |
---|
| 8 | |
---|
[468] | 9 | fetch_uri( |
---|
| 10 | 'wp-admin/setup-config.php', |
---|
| 11 | {step => 2}, |
---|
| 12 | {dbhost => $sqlhost, |
---|
| 13 | uname => $sqluser, |
---|
| 14 | dbname => $sqldb, |
---|
| 15 | pwd => $sqlpass, |
---|
| 16 | prefix => '', |
---|
| 17 | submit => 'Submit', |
---|
| 18 | step => 2}); |
---|
[127] | 19 | |
---|
[468] | 20 | my $html = fetch_uri( |
---|
| 21 | 'wp-admin/install.php', |
---|
| 22 | {step => 2}, |
---|
| 23 | {weblog_title => 'My Blog', |
---|
[476] | 24 | admin_email => $email, |
---|
[468] | 25 | submit => 'Continue', |
---|
| 26 | step => 2}); |
---|
[743] | 27 | while ($html =~ /<code>(.*)<\/code>/g) { |
---|
[468] | 28 | $admin_username = $admin_password; |
---|
| 29 | $admin_password = $1; |
---|
| 30 | } |
---|
[127] | 31 | |
---|
[725] | 32 | my $dbh = DBI->connect("dbi:mysql:database=$sqldb;host=$sqlhost", $sqluser, $sqlpass); |
---|
| 33 | $dbh->do("update wp_options set option_value = ? where option_name = 'siteurl'", |
---|
| 34 | {}, "/~$USER/$addrend"); |
---|
| 35 | $dbh->do("update wp_options set option_value = ? where option_name = 'home'", |
---|
| 36 | {}, "http://$USER.$server/$addrend"); |
---|
| 37 | $dbh->disconnect; |
---|
| 38 | |
---|
[127] | 39 | print_login_info(); |
---|
| 40 | print "You will also receive this login information at your MIT email address.\n"; |
---|
| 41 | press_enter(); |
---|
Note: See
TracBrowser
for help on using the repository browser.