source: locker/deploy/bin/mediawiki @ 995

Last change on this file since 995 was 476, checked in by andersk, 17 years ago
Add $email variable.
  • Property svn:executable set to *
File size: 1008 bytes
Line 
1#!/usr/bin/perl
2use strict;
3use lib '/mit/scripts/deploy/bin';
4use onserver;
5
6setup();
7
8`cp skins/common/images/mediawiki.png skins/common/images/wiki.png`;
9`patch -s -p1 < /mit/scripts/deploy/mediawiki.patch`;
10
11print "\nPlease decide upon a title for your wiki and enter it below.\n";
12print "Desired title: ";
13my $title=<STDIN>;
14chomp($title);
15
16my $html = fetch_uri(
17    'config/index.php',
18    {},
19    {Sitename => $title,
20     EmergencyContact => $email,
21     LanguageCode => 'en',
22     DBserver => $sqlhost,
23     DBname => $sqldb,
24     DBuser => $sqluser,
25     DBpassword => $sqlpass,
26     DBpassword2 => $sqlpass,
27     defaultEmail => $email,
28     SysopName => $admin_username,
29     SysopPass => $admin_password,
30     SysopPass2 => $admin_password});
31unless ($html =~ /Installation successful/) {
32    print STDERR "ERROR: Automatic MediaWiki configuration failed.  You will need to configure\nyour MediaWiki manually, or email scripts\@mit.edu for help.\n";
33    exit;
34}
35`cp config/LocalSettings.php .`;
Note: See TracBrowser for help on using the repository browser.