Changeset 456 for locker/deploy


Ignore:
Timestamp:
Oct 13, 2007, 4:25:50 AM (17 years ago)
Author:
quentin
Message:
mediawiki 1.11 installer + improvements to installer system
Location:
locker/deploy/bin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • locker/deploy/bin/mediawiki

    r127 r456  
    11#!/usr/bin/perl
    22use strict;
    3 use lib '/mit/scripts/deploy/bin';
     3use lib '/mit/scripts/deploydev/bin';
    44use onserver;
    55
     
    1414totmp("-d \"Sitename=$title&EmergencyContact=$USER\@mit.edu&LanguageCode=en&DBserver=$sqlhost&DBname=$sqldbcurl&DBuser=$sqluser&DBpassword=$sqlpass&DBpassword2=$sqlpass&defaultEmail=$USER\@mit.edu&SysopName=$admin_username&SysopPass=$admin_password&SysopPass2=$admin_password\"");
    1515`curl -K $tmp http://$server/~$USER/$addrend/config/index.php`;
    16 `patch includes/Setup.php /mit/scripts/deploy/mediawiki.patch >/dev/null`;
     16`patch -p1 < /mit/scripts/deploy/mediawiki.patch >/dev/null`;
    1717`cp config/LocalSettings.php .`;
    1818`rm -rf contrib`;
  • locker/deploy/bin/onathena

    r438 r456  
    77  fi
    88}
     9
     10die() {
     11  echo "== INSTALLATION FAILED =="
     12  echo "Sorry, the installation failed:"
     13  echo "$@"
     14  echo "Please contact scripts@mit.edu and provide a copy of the output of this installer."
     15  exit 1
     16}
     17 
    918
    1019sshrun() {
     
    3039}
    3140
    32 #if [ "$override" = "" ]; then
    33 #echo "The scripts.mit.edu automatic installers are currently unavailable."
    34 #echo "We hope to make them available again soon."
    35 #echo "If you would like us to notify you as soon as they are available again,"
    36 #echo "let us know by sending us an e-mail at scripts@mit.edu"
    37 #exit
    38 #fi
     41if [ "$override" = "" ]; then
     42echo "The scripts.mit.edu automatic installers are currently unavailable."
     43echo "We hope to make them available again soon."
     44echo "If you would like us to notify you as soon as they are available again,"
     45echo "let us know by sending us an e-mail at scripts@mit.edu"
     46exit
     47fi
    3948
    4049echo
     
    216225cd $origdir
    217226
    218 sshrun "deploy$scriptsdev/bin/$deploy '$sname' '$deploy' '$addrend' '$admin_username' '$requires_sql' '$scriptsdev' '$USER'"
     227vsshrun "deploy$scriptsdev/bin/$deploy '$sname' '$deploy' '$addrend' '$admin_username' '$requires_sql' '$scriptsdev' '$USER'" || die "Unknown failure during configuration"
    219228rm -f /$lroot/web_scripts/$addrend/.scripts-tmp
    220229checkfailed
  • locker/deploy/bin/onserver.pm

    r240 r456  
    22use strict;
    33use Exporter;
     4use Sys::Hostname;
     5use File::Spec::Functions;
     6use File::Basename;
     7use Socket;
     8use Cwd qw(abs_path);
     9use POSIX qw(strftime);
    410our @ISA = qw(Exporter);
    511our @EXPORT = qw(setup totmp print_login_info press_enter $server $tmp $USER $HOME $sname $deploy $addrend $admin_username $requires_sql $addrlast $sqlhost $sqluser $sqlpass $sqldb $sqldbcurl $admin_password $scriptsdev $human);
     
    2026  print "  username: $admin_username\n";
    2127  print "  password: $admin_password\n";
     28}
     29
     30sub getclienthostname {
     31    if (my $sshclient = $ENV{"SSH_CLIENT"}) {
     32        my ($clientip) = split(' ', $sshclient);
     33        my $hostname = gethostbyaddr(inet_aton($clientip), AF_INET);
     34        return $hostname || $clientip;
     35    } else {
     36        return hostname();
     37    }
    2238}
    2339
     
    7187  print "\nConfiguring $sname...\n";
    7288 
    73   `date > .scripts-version`;
    74   `stat /mit/scripts/deploy$scriptsdev/$deploy.tar.gz >> .scripts-version`;
     89  open(VERSION, ">.scripts-version") or die "Can't write scripts-version file: $!\n";
     90  print VERSION strftime("%F %T %z\n", localtime);
     91  print VERSION $ENV{'USER'}, '@', getclienthostname(), "\n";
     92  my $tarball = abs_path("/mit/scripts/deploy$scriptsdev/$deploy.tar.gz");
     93  print VERSION $tarball, "\n";
     94  $tarball =~ s|/deploydev/|/deploy/|;
     95  print VERSION dirname($tarball), "\n";
     96  close(VERSION);
     97  if (0) {
     98      `date > .scripts-version`;
     99      `stat /mit/scripts/deploy$scriptsdev/$deploy.tar.gz >> .scripts-version`;
     100  }
    75101
    76102  select STDOUT;
Note: See TracChangeset for help on using the changeset viewer.