Changeset 456 for locker/deploy
- Timestamp:
- Oct 13, 2007, 4:25:50 AM (17 years ago)
- Location:
- locker/deploy/bin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
locker/deploy/bin/mediawiki
r127 r456 1 1 #!/usr/bin/perl 2 2 use strict; 3 use lib '/mit/scripts/deploy /bin';3 use lib '/mit/scripts/deploydev/bin'; 4 4 use onserver; 5 5 … … 14 14 totmp("-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\""); 15 15 `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`; 17 17 `cp config/LocalSettings.php .`; 18 18 `rm -rf contrib`; -
locker/deploy/bin/onathena
r438 r456 7 7 fi 8 8 } 9 10 die() { 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 9 18 10 19 sshrun() { … … 30 39 } 31 40 32 #if [ "$override" = "" ]; then33 #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 #exit38 #fi41 if [ "$override" = "" ]; then 42 echo "The scripts.mit.edu automatic installers are currently unavailable." 43 echo "We hope to make them available again soon." 44 echo "If you would like us to notify you as soon as they are available again," 45 echo "let us know by sending us an e-mail at scripts@mit.edu" 46 exit 47 fi 39 48 40 49 echo … … 216 225 cd $origdir 217 226 218 sshrun "deploy$scriptsdev/bin/$deploy '$sname' '$deploy' '$addrend' '$admin_username' '$requires_sql' '$scriptsdev' '$USER'"227 vsshrun "deploy$scriptsdev/bin/$deploy '$sname' '$deploy' '$addrend' '$admin_username' '$requires_sql' '$scriptsdev' '$USER'" || die "Unknown failure during configuration" 219 228 rm -f /$lroot/web_scripts/$addrend/.scripts-tmp 220 229 checkfailed -
locker/deploy/bin/onserver.pm
r240 r456 2 2 use strict; 3 3 use Exporter; 4 use Sys::Hostname; 5 use File::Spec::Functions; 6 use File::Basename; 7 use Socket; 8 use Cwd qw(abs_path); 9 use POSIX qw(strftime); 4 10 our @ISA = qw(Exporter); 5 11 our @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); … … 20 26 print " username: $admin_username\n"; 21 27 print " password: $admin_password\n"; 28 } 29 30 sub 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 } 22 38 } 23 39 … … 71 87 print "\nConfiguring $sname...\n"; 72 88 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 } 75 101 76 102 select STDOUT;
Note: See TracChangeset
for help on using the changeset viewer.