source: locker/deploy/bin/wordpress-star @ 1119

Last change on this file since 1119 was 1103, checked in by mitchb, 15 years ago
Uncommitted scriptsstar changes from the locker
  • Property svn:executable set to *
File size: 1.0 KB
RevLine 
[127]1#!/usr/bin/perl
2use strict;
[469]3use lib '/mit/scripts/deploy/bin';
[1103]4use onserver_star;
[725]5use DBI;
[127]6
7setup();
8
[468]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});
[127]19
[468]20my $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]27while ($html =~ /<code>(.*)<\/code>/g) {
[468]28    $admin_username = $admin_password;
29    $admin_password = $1;
30}
[127]31
[725]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
[127]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.