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

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