Last change
on this file since 999 was
743,
checked in by njess, 17 years ago
|
Updated wordpress installer for 2.5.1
|
-
Property svn:executable set to
*
|
File size:
1.0 KB
|
Line | |
---|
1 | #!/usr/bin/perl |
---|
2 | use strict; |
---|
3 | use lib '/mit/scripts/deploy/bin'; |
---|
4 | use onserver; |
---|
5 | use DBI; |
---|
6 | |
---|
7 | setup(); |
---|
8 | |
---|
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}); |
---|
19 | |
---|
20 | my $html = fetch_uri( |
---|
21 | 'wp-admin/install.php', |
---|
22 | {step => 2}, |
---|
23 | {weblog_title => 'My Blog', |
---|
24 | admin_email => $email, |
---|
25 | submit => 'Continue', |
---|
26 | step => 2}); |
---|
27 | while ($html =~ /<code>(.*)<\/code>/g) { |
---|
28 | $admin_username = $admin_password; |
---|
29 | $admin_password = $1; |
---|
30 | } |
---|
31 | |
---|
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 | |
---|
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.