source: trunk/locker/deploy/bin/wordpress @ 1119

Last change on this file since 1119 was 743, checked in by njess, 14 years ago
Updated wordpress installer for 2.5.1
  • Property svn:executable set to *
File size: 1.0 KB
Line 
1#!/usr/bin/perl
2use strict;
3use lib '/mit/scripts/deploy/bin';
4use onserver;
5use DBI;
6
7setup();
8
9fetch_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
20my $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});
27while ($html =~ /<code>(.*)<\/code>/g) {
28    $admin_username = $admin_password;
29    $admin_password = $1;
30}
31
32my $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
39print_login_info();
40print "You will also receive this login information at your MIT email address.\n";
41press_enter();
Note: See TracBrowser for help on using the repository browser.