source: branches/fc13-dev/locker/deploy/bin/wordpress @ 1775

Last change on this file since 1775 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
Line 
1#!/usr/bin/perl
2use strict;
3use FindBin qw($Bin);
4use lib $Bin;
5use onserver;
6use DBI;
7
8setup();
9
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});
20
21my $html = fetch_uri(
22    'wp-admin/install.php',
23    {step => 2},
24    {weblog_title => 'My Blog',
25     admin_email => $email,
26     submit => 'Continue',
27     step => 2});
28while ($html =~ /<code>(.*)<\/code>/g) {
29    $admin_username = $admin_password;
30    $admin_password = $1;
31}
32
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
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.