Index: /locker/bin/cronload
===================================================================
--- /locker/bin/cronload	(revision 127)
+++ /locker/bin/cronload	(revision 127)
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+echo "This program should print your new crontab below."
+echo "If it does not do so, something is wrong."
+echo "Feel free to contact scripts@mit.edu for assistance."
+echo
+
+cwd=`pwd`
+lname=`perl -e "\\\$temp = \"$cwd\"; \\\$temp =~ /\\\/([^\\\/]+)\\\/cron_scripts/; print \\\$1"`
+athrun scripts sshmic ${lname}@scripts.mit.edu "/usr/local/bin/cronload $1 $cwd" 2>/dev/null
Index: /locker/bin/cronload.old
===================================================================
--- /locker/bin/cronload.old	(revision 127)
+++ /locker/bin/cronload.old	(revision 127)
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+echo "This program should print your new crontab below."
+echo "If it does not do so, something is wrong."
+echo "Feel free to contact scripts@mit.edu for assistance."
+echo
+
+cwd=`pwd`
+lname=`perl -e "\\\$temp = \"$cwd\"; \\\$temp =~ /\\\/([^\\\/]+)\\\/cron_scripts/; print \\\$1"`
+athrun scripts sshmic -k scripts.mit.edu runas $lname "/usr/local/bin/cronload $1 $cwd" 2>/dev/null
Index: /locker/bin/deploy-php.ini
===================================================================
--- /locker/bin/deploy-php.ini	(revision 127)
+++ /locker/bin/deploy-php.ini	(revision 127)
@@ -0,0 +1,7 @@
+#!/bin/sh
+ 
+attach scripts 2>/dev/null
+if [ -f "/mit/scripts/deploy/php.ini/$1" ]; then
+	sed /SCRIPTS_USER/s//$2/ /mit/scripts/deploy/php.ini/$1 > php.ini
+	athrun scripts gfind . -type d -mindepth 1 | xargs -n1 ln -nfs `pwd`/php.ini 2>/dev/null
+fi
Index: /locker/bin/disabled/signup-sql
===================================================================
--- /locker/bin/disabled/signup-sql	(revision 127)
+++ /locker/bin/disabled/signup-sql	(revision 127)
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+attach scripts 2>/dev/null
+. /mit/scripts/deploy/bin/sql-signup
Index: /locker/bin/foo
===================================================================
--- /locker/bin/foo	(revision 127)
+++ /locker/bin/foo	(revision 127)
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+attach scripts 2>/dev/null
+. /mit/scripts/bin$scriptsdev/signup-minimal
+
+sed /SCRIPTS_USER/s//$lname/ /mit/scripts/bin/procmailrc > /mit/$lname/mail_scripts/procmailrc
+#  echo -e ":0\n*\n! $USER@mit.edu" >/mit/$lname/mail_scripts/procmailrc
+success "the mail script service" "The directory /mit/$lname/mail_scripts has been created."
Index: /locker/bin/fssar
===================================================================
--- /locker/bin/fssar	(revision 127)
+++ /locker/bin/fssar	(revision 127)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+athrun scripts gfind . -type d -print | xargs -i@ fs sa -dir @ -acl $@
Index: /locker/bin/gfind
===================================================================
--- /locker/bin/gfind	(revision 127)
+++ /locker/bin/gfind	(revision 127)
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+gnu=`/usr/bin/find --version 2>/dev/null | grep -i gnu`
+if [ "$gnu" != "" ]; then
+	/usr/bin/find "$@"
+else
+	athrun gnu gfind "$@"
+fi
Index: /locker/bin/gtar
===================================================================
--- /locker/bin/gtar	(revision 127)
+++ /locker/bin/gtar	(revision 127)
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+gnu=`/bin/tar --version 2>/dev/null | grep -i gnu`
+if [ "$gnu" != "" ]; then
+	/bin/tar $@
+else
+	athrun gnu gtar $@
+fi
Index: /locker/bin/procmailrc
===================================================================
--- /locker/bin/procmailrc	(revision 127)
+++ /locker/bin/procmailrc	(revision 127)
@@ -0,0 +1,3 @@
+:0
+*
+! SCRIPTS_USER@mit.edu
Index: /locker/bin/scripts
===================================================================
--- /locker/bin/scripts	(revision 127)
+++ /locker/bin/scripts	(revision 127)
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+attach scripts 2>/dev/null
+. /mit/scripts/bin/scripts-start
Index: /locker/bin/scripts-advancedbook
===================================================================
--- /locker/bin/scripts-advancedbook	(revision 127)
+++ /locker/bin/scripts-advancedbook	(revision 127)
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+sname="Advanced Guestbook"
+deploy="advancedbook"
+prompt_username=1
+. /mit/scripts/deploy$scriptsdev/bin/onathena
Index: /locker/bin/scripts-advancedpoll
===================================================================
--- /locker/bin/scripts-advancedpoll	(revision 127)
+++ /locker/bin/scripts-advancedpoll	(revision 127)
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+sname="Advanced Poll"
+deploy="advancedpoll"
+prompt_username=1
+. /mit/scripts/deploy$scriptsdev/bin/onathena
Index: /locker/bin/scripts-e107
===================================================================
--- /locker/bin/scripts-e107	(revision 127)
+++ /locker/bin/scripts-e107	(revision 127)
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+sname="e107"
+deploy="e107"
+prompt_username=1
+. /mit/scripts/deploy$scriptsdev/bin/onathena
Index: /locker/bin/scripts-gallery2
===================================================================
--- /locker/bin/scripts-gallery2	(revision 127)
+++ /locker/bin/scripts-gallery2	(revision 127)
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+sname="Gallery2"
+deploy="gallery2"
+prompt_username=1
+create_dir=1
+
+. /mit/scripts/deploy$scriptsdev/bin/onathena
Index: /locker/bin/scripts-joomla
===================================================================
--- /locker/bin/scripts-joomla	(revision 127)
+++ /locker/bin/scripts-joomla	(revision 127)
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+sname="Joomla"
+deploy="joomla"
+. /mit/scripts/deploy$scriptsdev/bin/onathena
Index: /locker/bin/scripts-mediawiki
===================================================================
--- /locker/bin/scripts-mediawiki	(revision 127)
+++ /locker/bin/scripts-mediawiki	(revision 127)
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+sname="MediaWiki"
+deploy="mediawiki"
+prompt_username=1
+. /mit/scripts/deploy$scriptsdev/bin/onathena
Index: /locker/bin/scripts-phpbb
===================================================================
--- /locker/bin/scripts-phpbb	(revision 127)
+++ /locker/bin/scripts-phpbb	(revision 127)
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+sname="phpBB"
+deploy="phpbb"
+. /mit/scripts/deploy$scriptsdev/bin/onathena
Index: /locker/bin/scripts-phpical
===================================================================
--- /locker/bin/scripts-phpical	(revision 127)
+++ /locker/bin/scripts-phpical	(revision 127)
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+sname="PHP iCalendar"
+deploy="phpical"
+requires_sql=0
+. /mit/scripts/deploy$scriptsdev/bin/onathena
Index: /locker/bin/scripts-rm
===================================================================
--- /locker/bin/scripts-rm	(revision 127)
+++ /locker/bin/scripts-rm	(revision 127)
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ "$USER" = "" ]; then
+    echo "Error.  Please contact scripts@mit.edu for assistance."
+elif [ "$1" = "" ]; then
+    echo "You must specify a subdirectory of web_scripts to delete."
+else
+    rm -rf /mit/$USER/web_scripts/$1
+fi
Index: /locker/bin/scripts-start
===================================================================
--- /locker/bin/scripts-start	(revision 127)
+++ /locker/bin/scripts-start	(revision 127)
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+echo
+echo "What piece of software would you like to install?"
+echo
+echo 1. MediaWiki
+echo 2. WordPress
+echo 3. Joomla
+echo 4. e107
+echo 5. Gallery2
+echo 6. phpBB
+echo 7. Advanced Guest Book
+echo 8. Advanced Poll
+echo 9. PHP iCalendar
+echo
+printf "Please enter a number 1-9: "
+read num
+echo
+
+attach scripts 2>/dev/null
+if [ "$num" -eq 1 ]; then
+  . /mit/scripts/bin$scriptsdev/scripts-mediawiki
+elif [ "$num" -eq 2 ]; then
+  . /mit/scripts/bin$scriptsdev/scripts-wordpress
+elif [ "$num" -eq 3 ]; then
+  . /mit/scripts/bin$scriptsdev/scripts-joomla
+elif [ "$num" -eq 4 ]; then
+  . /mit/scripts/bin$scriptsdev/scripts-e107
+elif [ "$num" -eq 5 ]; then
+  . /mit/scripts/bin$scriptsdev/scripts-gallery2
+elif [ "$num" -eq 6 ]; then
+  . /mit/scripts/bin$scriptsdev/scripts-phpbb
+elif [ "$num" -eq 7 ]; then
+  . /mit/scripts/bin$scriptsdev/scripts-advancedbook
+elif [ "$num" -eq 8 ]; then
+  . /mit/scripts/bin$scriptsdev/scripts-advancedpoll
+elif [ "$num" -eq 9 ]; then
+  . /mit/scripts/bin$scriptsdev/scripts-phpical
+else
+  echo ERROR:
+  echo You must enter a number 1 through 9.
+  exit 1
+fi
Index: /locker/bin/scripts-wordpress
===================================================================
--- /locker/bin/scripts-wordpress	(revision 127)
+++ /locker/bin/scripts-wordpress	(revision 127)
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+sname="WordPress"
+deploy="wordpress"
+prompt_password=0
+. /mit/scripts/deploy$scriptsdev/bin/onathena
Index: /locker/bin/signup-cron
===================================================================
--- /locker/bin/signup-cron	(revision 127)
+++ /locker/bin/signup-cron	(revision 127)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+attach scripts 2>/dev/null
+. /mit/scripts/bin$scriptsdev/signup-minimal
+
+if [ ! -d "/mit/$lname/cron_scripts/" ]; then
+  mkdir 2>/dev/null /mit/$lname/cron_scripts
+  fs sa /mit/$lname/cron_scripts system:anyuser l
+  fs sa /mit/$lname/cron_scripts daemon.scripts write
+  DATE=`date`
+  sed '/SCRIPTS_USER/s//'"$lname"'/g' /mit/scripts/deploy/crontab | sed '/SCRIPTS_DATE/s//'"$DATE"'/g' > /mit/$lname/cron_scripts/crontab
+  success "the cron script service" "The directory /mit/$lname/cron_scripts has been created."
+else
+  success "the cron script service" "The directory /mit/$lname/cron_scripts already exists." 
+fi
Index: /locker/bin/signup-mail
===================================================================
--- /locker/bin/signup-mail	(revision 127)
+++ /locker/bin/signup-mail	(revision 127)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+attach scripts 2>/dev/null
+. /mit/scripts/bin$scriptsdev/signup-minimal
+
+if [ ! -d "/mit/$lname/mail_scripts/" ]; then
+  mkdir 2>/dev/null /mit/$lname/mail_scripts
+  fs sa /mit/$lname/mail_scripts system:anyuser l
+  fs sa /mit/$lname/mail_scripts daemon.scripts read
+  sed /SCRIPTS_USER/s//$lname/ /mit/scripts/bin/procmailrc > /mit/$lname/mail_scripts/procmailrc
+#  echo -e ":0\n*\n! $USER@mit.edu" >/mit/$lname/mail_scripts/procmailrc
+  success "the mail script service" "The directory /mit/$lname/mail_scripts has been created."
+else
+  success "the mail script service" "The directory /mit/$lname/mail_scripts already exists."
+fi
Index: /locker/bin/signup-minimal
===================================================================
--- /locker/bin/signup-minimal	(revision 127)
+++ /locker/bin/signup-minimal	(revision 127)
@@ -0,0 +1,91 @@
+#!/bin/sh
+
+if [ "$initlname" = "" ]; then
+  if [ "$lname" = "" ]; then
+    initlname=0
+  else
+    initlname=1
+  fi
+fi
+
+if [ "$lname" = "" ]; then
+  if [ "$1" = "" ]; then
+    echo
+    echo Would you like to sign up:
+    echo 1. Your personal Athena account
+    echo 2. A locker that you control \(a club, a course, etc\)
+    echo If you do not understand this question, you should answer \'1\'.
+    printf "Please enter either '1' or '2' (without quotes): "
+    read whofor
+    if [ "$whofor" -eq 1 ]; then
+        lname=$USER
+        lroot=$HOME
+    elif [ "$whofor" -eq 2 ]; then
+        echo
+        echo OK.  A locker of your choice that you control will be signed up.
+        echo Please enter the name of the selected locker below.
+        echo "(For the locker /mit/sipb, you would enter sipb)."
+        printf "Locker name: "
+        read lname
+        lroot="/mit/$lname"
+    else
+        echo
+        echo ERROR:
+        echo You must select either '1' or '2'.
+        exit 1
+    fi
+  else
+    lname=$1
+  fi
+fi
+
+attach $lname 2>/dev/null
+
+if [ "$lname" != "$USER" ]; then
+  temp=$lname
+  lname=$USER
+  . /mit/scripts/bin$scriptsdev/signup-minimal
+  lname=$temp
+
+  ans=`sshmic -k scripts.mit.edu /usr/local/bin/admof $lname ${USER}@ATHENA.MIT.EDU` 
+  if [ "$ans" != "yes" ]; then
+    echo
+    echo ERROR:
+    printf "It appears as though you are not an administrator of the locker <$lname>.\n"
+    echo Try running \"fs sa /mit/$lname $USER all\" and starting over.
+    echo Contact scripts@mit.edu if you are unable to solve the problem.
+    exit 0
+  fi
+fi
+
+attach $lname 2>/dev/null
+
+if [ ! -d "/mit/$lname" ]; then
+  echo
+  echo ERROR:
+  printf "Cannot find locker <$lname>."
+  exit 0
+fi
+
+mkdir /mit/$lname/.scripts-signup 2>/dev/null
+
+if [ ! -d "/mit/$lname/.scripts-signup" ]; then
+  echo
+  echo ERROR:
+  printf "It appears as though you do not have write access to the locker <$lname>.\n"
+  echo Contact scripts@mit.edu if you are unable to solve the problem.
+  exit 0
+fi
+
+athrun gnu wget -q -O/dev/null http://scripts.mit.edu/~signup/signup.php\?username=$lname
+rmdir /mit/$lname/.scripts-signup
+
+success() {
+  if [ "$initlname" -eq 0 ]; then
+    echo
+    echo "== SUCCESS =="
+    echo $lname is now signed up for $1.
+    echo $2
+    echo
+  fi
+}
Index: /locker/bin/signup-sql
===================================================================
--- /locker/bin/signup-sql	(revision 127)
+++ /locker/bin/signup-sql	(revision 127)
@@ -0,0 +1,111 @@
+#!/bin/sh
+
+checkfailed() {
+  if [ -f "$lroot/web_scripts/$addrend/.failed" ]; then
+    rm -f $lroot/web_scripts/$addrend/.failed
+    exit 1
+  fi
+}
+
+sshrun() {
+  athrun scripts sshmic scripts.mit.edu /usr/local/bin/runas $lname /mit/scripts/$1 2>/dev/null
+}
+
+vsshrun() {
+  athrun scripts sshmic scripts.mit.edu /usr/local/bin/runas $lname /mit/scripts/$1
+}
+
+checksqlpass() {
+    errors=`sshrun 'sql/bin$scriptsdev/test-password'`
+    if [ "$errors" != "" ]; then
+        if [ "$1" -eq 1 ]; then
+          rm -f $lroot/.sql/my.cnf
+        fi
+        echo
+        echo ERROR:
+        printf "$2"
+        printf "$3"
+        exit
+    fi
+}
+
+echo 
+echo == Welcome to the sql.mit.edu signup process ==
+echo
+
+echo "For documentation, including a link to the Athena rules of use,"
+echo "see <http://sql.mit.edu>."
+echo
+echo Please report problems with this signup process to sql@mit.edu.
+echo
+echo Are you performing this signup for:
+echo 1. Your personal Athena account
+echo 2. A locker that you control \(a club, a course, etc\)
+echo If you do not understand this question, you should answer \'1\'.
+printf "Please enter either '1' or '2' (without quotes): "
+read whofor
+if [ "$whofor" -eq 1 ]; then
+    lname=$USER
+    lroot=$HOME 
+elif [ "$whofor" -eq 2 ]; then
+    echo
+    echo OK.  A MySQL account will be created for a locker of your choice that
+    echo you control.  Please enter the name of the selected locker below.
+    echo "(For the locker /mit/sipb, you would enter sipb)."
+    printf "Locker name: "
+    read lname
+    lroot="/mit/$lname" 
+else
+    echo
+    echo ERROR:
+    echo You must select either '1' or '2'.
+    exit 1
+fi
+
+# Users need to sign up for scripts.mit.edu so that they can
+# authenticate themselves to sql.mit.edu
+attach scripts 2>/dev/null
+. /mit/scripts/bin$scriptsdev/signup-web
+
+if [ "$requires_sql" = "" ]; then
+  requires_sql=1
+fi
+
+if [ ! -f "$lroot/.my.cnf" ]; then
+  mkdir $lroot/.sql 2>/dev/null
+  fs sa $lroot/.sql system:anyuser none
+  fs sa $lroot/.sql daemon.scripts write
+  ln -nfs $lroot/.sql/my.cnf $lroot/.my.cnf 2>/dev/null
+fi
+
+if [ "$requires_sql" -eq 1 ]; then
+  sqlinfo=`sshrun "sql/bin$scriptsdev/get-password"`
+  if [ "$sqlinfo" = "" ]; then
+      echo 
+      echo You already have a MySQL account but you do not have a .my.cnf file.
+      echo If you do not remember your MySQL account password, you can change it
+      echo at http://sql.mit.edu using MIT certificates. 
+      printf "Please type your MySQL password and press [enter]: "
+      stty -echo
+      read sqlpass
+      stty echo
+      echo
+      sqlhost="sql.mit.edu"
+      sqluser=$lname
+      . /mit/scripts/sql/bin$scriptsdev/save-password
+      checksqlpass 1 'The MySQL password that you typed appears to be incorrect.\n' ''
+      echo
+      echo OK.  Continuing with the install...
+  else
+      checksqlpass 0 'The MySQL login information in your .my.cnf file\n' 'appears to be incorrect.\n'
+  fi
+fi
+
+echo
+echo == Setup complete! ==
+echo Your MySQL login information has been written to the file
+echo "</mit/$lname/.sql/my.cnf>."
+echo You must use the sql.mit.edu web interface to add or drop databases.
+echo If you have trouble with your MySQL account, feel free to contact
+echo the sql.mit.edu team by e-mailing sql@mit.edu
+exit 0
Index: /locker/bin/signup-web
===================================================================
--- /locker/bin/signup-web	(revision 127)
+++ /locker/bin/signup-web	(revision 127)
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+attach -q scripts
+. /mit/scripts/bin$scriptsdev/signup-minimal
+
+if [ ! -d "/mit/$lname/web_scripts/" ]; then
+    mkdir -p /mit/$lname/web_scripts
+    fs sa /mit/$lname/web_scripts system:anyuser l
+    fs sa /mit/$lname/web_scripts system:scripts-security-upd rl
+    fs sa /mit/$lname/web_scripts daemon.scripts write
+    success "the web script service" "The directory /mit/$lname/web_scripts has been created."
+else 
+    success "the web script service" "The directory /mit/$lname/web_scripts already exists."
+fi
Index: /locker/bin/ssh
===================================================================
--- /locker/bin/ssh	(revision 127)
+++ /locker/bin/ssh	(revision 127)
@@ -0,0 +1,1 @@
+link ../ssh/bin/ssh
Index: /locker/bin/sshmic
===================================================================
--- /locker/bin/sshmic	(revision 127)
+++ /locker/bin/sshmic	(revision 127)
@@ -0,0 +1,1 @@
+link ../ssh/bin/ssh
Index: /locker/bin/webaccess
===================================================================
--- /locker/bin/webaccess	(revision 127)
+++ /locker/bin/webaccess	(revision 127)
@@ -0,0 +1,65 @@
+#!/usr/bin/perl
+use strict;
+
+my ($op, $username) = @ARGV;
+
+if(defined $op and $op eq "reset") {
+	system("rm -f .htaccess .htpasswd");
+    print "\nDone.  All access restrictions removed.\n\n";
+	exit(0);
+}
+
+if(!defined $op or !defined $username or
+	($op ne "allow" and $op ne "remove")) {
+	print "Usage: webaccess [allow username] [remove username] [reset]\n";
+	exit(0);
+}
+
+if($op eq "allow" or $op eq "remove") {
+	open(HTPASSWD, ".htpasswd");
+	open(TMP, ">.htpasswd_tmp");
+	while(my $line = <HTPASSWD>) {
+		print TMP "$line" unless($line =~ /$username\:/);
+	}
+	close(TMP);
+	close(HTPASSWD);
+	system("mv .htpasswd_tmp .htpasswd");
+}
+
+if($op eq "allow") {
+	my $password;
+	print "Enter new password for $username: ";
+	system("stty -echo");
+	chop($password = <STDIN>);
+	system("stty echo");
+	print "\n";
+
+	open(HTACCESS, ">.htaccess");
+	print HTACCESS <<ENDFILE;
+AuthUserFile $ENV{PWD}/.htpasswd
+AuthName Private
+AuthType Basic
+<Limit GET>
+require valid-user
+</Limit>
+ENDFILE
+	close(HTACCESS);
+	chmod(0777, ".htaccess");
+
+	my $salt = substr($username, 0, 2);
+	$password = crypt($password, $salt);
+
+	open(HTPASSWD, ">>.htpasswd");
+	print HTPASSWD "$username\:$password\n";
+	close(HTPASSWD);
+	chmod(0777, ".htpasswd");
+}
+
+print "\nDone.  New list of valid usernames:\n";
+open(HTPASSWD, ".htpasswd");
+while(my $line = <HTPASSWD>) {
+	$line =~ /(.*):/;
+	print "$1\n";
+}
+close(HTPASSWD);
+print "\n";
Index: /locker/deploy/bin/advancedbook
===================================================================
--- /locker/deploy/bin/advancedbook	(revision 127)
+++ /locker/deploy/bin/advancedbook	(revision 127)
@@ -0,0 +1,32 @@
+#!/usr/bin/perl
+use strict;
+use lib '/mit/scripts/deploy/bin';
+use onserver;
+
+setup();
+
+undef $/;
+
+open(FILE, "admin/contemp.php");
+my $a = <FILE>;
+close(FILE);
+$a =~ s/localhost/$sqlhost/g;
+$a =~ s/dbuser/$sqluser/g;
+$a =~ s/dbpass/$sqlpass/g;
+$a =~ s/guestbookdb/$sqldb/g;
+$a =~ s/useremail/$human\@mit.edu/g;
+open(FILE, ">admin/config.inc.php");
+print FILE $a;
+close(FILE);
+
+open(FILE, "instemp.php");
+$a = <FILE>;
+close(FILE);
+$a =~ s/gbuser/$admin_username/g;
+$a =~ s/gbpass/$admin_password/g;
+open(FILE, ">install.php");
+print FILE $a;
+close(FILE);
+
+totmp("-d \"action=Create%20table&db=$sqldbcurl&host=$sqlhost&name=$sqluser&pass=$sqlpass\"");
+`curl -K $tmp http://$server/~$USER/$addrend/install.php 2>/dev/null`;
Index: /locker/deploy/bin/advancedpoll
===================================================================
--- /locker/deploy/bin/advancedpoll	(revision 127)
+++ /locker/deploy/bin/advancedpoll	(revision 127)
@@ -0,0 +1,34 @@
+#!/usr/bin/perl
+use strict;
+use lib '/mit/scripts/deploy/bin';
+use onserver;
+
+setup();
+
+undef $/;
+open(FILE, "include/contemp.php");
+my $a = <FILE>;
+close(FILE);
+$a =~ s/localhost/$sqlhost/g;
+$a =~ s/dbuser/$sqluser/g;
+$a =~ s/dbpass/$sqlpass/g;
+$a =~ s/polldb/$sqldb/g;
+open(FILE, ">include/config.inc.php");
+print FILE $a;
+close(FILE);
+
+`curl http://$server/~$USER/$addrend/install.php\?action=step_2 2>/dev/null`;
+`curl http://$server/~$USER/$addrend/install.php\?action=step_3 2>/dev/null`;
+`curl http://$server/~$USER/$addrend/install.php\?action=step_4 2>/dev/null`;
+
+totmp("-d \"action=step_6&username=$admin_username&password=$admin_password\""); 
+`curl -K $tmp http://$server/~$USER/$addrend/install.php\?action=step_6 2>/dev/null`;
+
+`rm -r include/contemp.php`;
+
+print <<END;
+Your $sname Admin Panel is at
+http://$server/~$USER/$addrend/admin
+You can use this admin panel to create your first poll.
+END
+press_enter();
Index: /locker/deploy/bin/e107
===================================================================
--- /locker/deploy/bin/e107	(revision 127)
+++ /locker/deploy/bin/e107	(revision 127)
@@ -0,0 +1,18 @@
+#!/usr/bin/perl
+use strict;
+use lib '/mit/scripts/deploy/bin';
+use onserver;
+
+setup();
+
+totmp("-d \"server=$sqlhost&name=$sqluser&password=$sqlpass&db=$sqldbcurl&prefix=e107_&stage=3\""); 
+my $preva=`curl -K $tmp http://$server/~$USER/$addrend/install.php 2>/dev/null | grep previous_steps | cut -d "'" -f 6`;
+
+my $prevb=`curl -d "stage=4&previous_steps=$preva" http://$server/~$USER/$addrend/install.php 2>/dev/null | grep previous_steps | cut -d "'" -f 6`;
+
+totmp("-d \"u_name=$admin_username&d_name=$admin_username&pass1=$admin_password&pass2=$admin_password&email=$human\@mit.edu&stage=6&previous_steps=$prevb\"");
+my $prevc=`curl -K $tmp http://$server/~$USER/$addrend/install.php 2>/dev/null | grep previous_steps | cut -d "'" -f 6`;
+
+`curl -d "stage=7&previous_steps=$prevc" http://$server/~$USER/$addrend/install.php >/dev/null 2>/dev/null`;
+
+`rm -rf install.php`;
Index: /locker/deploy/bin/gallery2
===================================================================
--- /locker/deploy/bin/gallery2	(revision 127)
+++ /locker/deploy/bin/gallery2	(revision 127)
@@ -0,0 +1,34 @@
+#!/usr/bin/perl
+use strict;
+use lib '/mit/scripts/deploy/bin';
+use onserver;
+
+setup();
+
+`rm -rf $HOME/scripts-gallery2/$sqldb`;
+`mkdir -p $HOME/scripts-gallery2/$sqldb`;
+
+`patch install/steps/AuthenticateStep.class /mit/scripts/deploy/gallery2.patch`;
+
+`curl -c .cookies http://scripts.mit.edu/~$USER/$addrend/install/index.php 2>/dev/null`;
+`curl -b .cookies -d "language=en_US" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=1 2>/dev/null`;
+`curl -b .cookies -d "" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=2 2>/dev/null`;
+`curl -b .cookies -d "" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=3 2>/dev/null`;
+`curl -b .cookies -d "isMultisite=0&dir=/mit/$USER/scripts-gallery2/$sqldbcurl&action=save" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=4 2>/dev/null`;
+`curl -b .cookies -d "isMultisite=0&dir=/mit/$USER/scripts-gallery2/$sqldbcurl&action=save" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=4 2>/dev/null`;
+
+totmp("-d \"type=mysql&hostname=$sqlhost&action=save&confirmReuseTables=&confirmCleanInstall=&username=$sqluser&password=$sqlpass&database=$sqldbcurl&tablePrefix=g2_&columnPrefix=g_\"");
+
+`curl -b .cookies -K $tmp http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=5 2>/dev/null`;
+`curl -b .cookies -K $tmp http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=5 2>/dev/null`;
+
+totmp("-d \"adminName=$admin_username&passwordA=$admin_password&action=create&passwordB=$admin_password&email=$human\@mit.edu&fullName=$USER\"");
+
+`curl -b .cookies -K $tmp http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=6 2>/dev/null`;
+`curl -b .cookies -d "" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=7 2>/dev/null`;
+`curl -b .cookies -d "" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=8 2>/dev/null`;
+`curl -b .cookies -d "module[imagemagick]=on&activate=1" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=9 2>/dev/null`;
+`curl -b .cookies -d "" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=10 2>/dev/null`;
+`curl -b .cookies -d "" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=11 2>/dev/null`;
+
+unlink ".cookies";
Index: /locker/deploy/bin/joomla
===================================================================
--- /locker/deploy/bin/joomla	(revision 127)
+++ /locker/deploy/bin/joomla	(revision 127)
@@ -0,0 +1,21 @@
+#!/usr/bin/perl
+use strict;
+use lib '/mit/scripts/deploy/bin';
+use onserver;
+
+setup();
+
+print "\nPlease decide upon a title for your site and enter it below.\n";
+print "Desired title: ";
+my $title = <STDIN>;
+chomp($title);
+
+totmp("-d \"DBhostname=$sqlhost&DBuserName=$sqluser&DBpassword=$sqlpass&DBDel=0&DBname=$sqldbcurl&DBPrefix=jos_&DBSample=1\""); 
+`curl -K $tmp http://$server/~$USER/$addrend/installation/install2.php 2>/dev/null`;
+
+my $pwd = `pwd`;
+chomp($pwd);
+totmp("-d \"DBhostname=$sqlhost&DBuserName=$sqluser&DBpassword=$sqlpass&DBname=$sqldbcurl&DBPrefix=jos_&sitename=$title&siteUrl=http://$server/~$USER/$addrend&absolutePath=$pwd&adminEmail=$human%40mit.edu&adminPassword=$admin_password&filePerms=0&dirPerms=0\"");
+`curl -K $tmp http://$server/~$USER/$addrend/installation/install4.php 2>/dev/null`;
+
+`rm -rf installation`;
Index: /locker/deploy/bin/mediawiki
===================================================================
--- /locker/deploy/bin/mediawiki	(revision 127)
+++ /locker/deploy/bin/mediawiki	(revision 127)
@@ -0,0 +1,18 @@
+#!/usr/bin/perl
+use strict;
+use lib '/mit/scripts/deploy/bin';
+use onserver;
+
+setup();
+
+`cp skins/common/images/mediawiki.png skins/common/images/wiki.png`;
+
+print "\nPlease decide upon a title for your wiki and enter it below.\n";
+print "Desired title: ";
+my $title=<STDIN>;
+chomp($title);
+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\"");
+`curl -K $tmp http://$server/~$USER/$addrend/config/index.php`; 
+`patch includes/Setup.php /mit/scripts/deploy/mediawiki.patch >/dev/null`;
+`cp config/LocalSettings.php .`;
+`rm -rf contrib`;
Index: /locker/deploy/bin/onathena
===================================================================
--- /locker/deploy/bin/onathena	(revision 127)
+++ /locker/deploy/bin/onathena	(revision 127)
@@ -0,0 +1,219 @@
+#!/bin/sh
+
+checkfailed() {
+  if [ -f "$lroot/web_scripts/$addrend/.failed" ]; then
+    rm -f $lroot/web_scripts/$addrend/.failed
+    exit 1
+  fi
+}
+
+sshrun() {
+  athrun scripts sshmic scripts.mit.edu /usr/local/bin/runas $lname /mit/scripts/$1 2>/dev/null
+}
+
+vsshrun() {
+  athrun scripts sshmic scripts.mit.edu /usr/local/bin/runas $lname /mit/scripts/$1
+}
+
+checksqlpass() {
+    errors=`sshrun 'sql/bin$scriptsdev/test-password'`
+    if [ "$errors" != "" ]; then
+        if [ "$1" -eq 1 ]; then
+          rm -f $lroot/.sql/my.cnf
+        fi
+        echo
+        echo ERROR:
+        printf "$2"
+        printf "$3"
+        exit
+    fi
+}
+
+#echo "The scripts.mit.edu automatic installers are currently unavailable."
+#echo "We hope to make them available again soon."
+#echo "If you would like us to notify you as soon as they are available again,"
+#echo "let us know by sending us an e-mail at scripts@mit.edu"
+#exit
+
+echo 
+echo == Welcome to the scripts.mit.edu installer for $sname ==
+echo
+
+echo "For documentation, including a link to the Athena rules of use,"
+echo "see <http://scripts.mit.edu/start>."
+echo
+echo Please report problems with this installer to scripts@mit.edu.
+echo
+echo Are you performing this install for:
+echo 1. Your personal Athena account
+echo 2. A locker that you control \(a club, a course, etc\)
+echo If you do not understand this question, you should answer \'1\'.
+printf "Please enter either '1' or '2' (without quotes): "
+read whofor
+if [ "$whofor" -eq 1 ]; then
+    lname=$USER
+    lroot=$HOME 
+elif [ "$whofor" -eq 2 ]; then
+    echo
+    echo OK.  $sname will be installed into a locker of your choice that
+    echo you control.  Please enter the name of the selected locker below.
+    echo "(For the locker /mit/lsc -- which has a full path of"
+    echo "/afs/athena.mit.edu/activity/l/lsc -- you would simply enter lsc)."
+    printf "Locker name: "
+    read lname
+    lroot="/mit/$lname" 
+else
+    echo
+    echo ERROR:
+    echo You must select either '1' or '2'.
+    exit 1
+fi
+
+echo
+echo Checking the status of your scripts.mit.edu account...
+
+attach scripts 2>/dev/null
+. /mit/scripts/bin$scriptsdev/signup-web
+
+echo
+echo Your new copy of $sname will appear on the web at a URL
+echo that starts with http://scripts.mit.edu/~$lname/
+echo Please decide upon a complete URL and enter it below.
+echo You must enter one or more characters after ~$lname/
+echo The completed address must only contain a-z, 0-9, and /.
+printf "Desired address: http://scripts.mit.edu/~$lname/"
+read addrend
+
+addrend=`perl -e "\\\$temp = \"$addrend\"; \\\$temp =~ /(^([a-z0-9A-Z\\\\/-]+)\$)/; print \\\$1"`
+if [ "$addrend" = "" ]; then
+	echo
+	echo ERROR:
+	echo You must enter one or more characters after ~$lname/
+	echo The completed address must only contain a-z, 0-9, and /.
+	exit 1
+fi
+
+if [ -d "$lroot/web_scripts/$addrend" ]; then
+    echo
+    echo ERROR:
+    echo You already have a directory corresponding to that web address.
+    echo Please remove that directory, choose a different address, or
+    echo contact scripts@mit.edu for assistance.
+    exit 1
+fi
+
+if [ "$requires_sql" = "" ]; then
+  requires_sql=1
+fi
+
+if [ ! -f "$lroot/.my.cnf" ]; then
+  mkdir $lroot/.sql 2>/dev/null
+  fs sa $lroot/.sql system:anyuser none
+  fs sa $lroot/.sql daemon.scripts write
+  ln -nfs $lroot/.sql/my.cnf $lroot/.my.cnf 2>/dev/null
+fi
+
+if [ "$requires_sql" -eq 1 ]; then
+  sqlinfo=`sshrun "sql/bin$scriptsdev/get-password"`
+  if [ "$sqlinfo" = "" ]; then
+      echo 
+      echo You already have a MySQL account but you do not have a .my.cnf file.
+      echo If you do not remember your MySQL account password, you can change it
+      echo at http://sql.mit.edu using MIT certificates. 
+      printf "Please type your MySQL password and press [enter]: "
+      stty -echo
+      read sqlpass
+      stty echo
+      echo
+      sqlhost="sql.mit.edu"
+      sqluser=$lname
+      . /mit/scripts/sql/bin$scriptsdev/save-password
+      checksqlpass 1 'The MySQL password that you typed appears to be incorrect.\n' ''
+      echo
+      echo OK.  Continuing with the install...
+  else
+      checksqlpass 0 'The MySQL login information in your .my.cnf file\n' 'appears to be incorrect.\n'
+  fi
+fi
+
+if [ "$prompt_username" = "" ]; then
+  admin_username="admin"
+  prompt_username=0
+fi
+if [ "$prompt_password" = "" ]; then
+  prompt_password=1
+fi
+
+if [ "$prompt_username" -eq 1 ]; then
+    echo
+    echo You will be able to log in to $sname using a username of your choice.
+    echo Please decide upon a username and enter it below.
+    echo "Your username must contain only alphanumeric characters (a-z, 0-9)."
+    printf "Desired username: "
+    read admin_username
+    admin_username=`perl -e "\\\$temp = \"$admin_username\"; \\\$temp =~ /(^([a-z0-9A-Z]+)\\\$)/; print \\\$1;"`
+    if [ "$admin_username" = "" ]; then
+        echo
+        echo ERROR:
+        echo "Your username must contain only alphanumeric characters (a-z, 0-9)."
+        echo You will need to run the installer again and choose a different username.
+        exit 1
+    fi
+fi
+
+if [ "$prompt_password" -eq 1 ]; then
+    stty -echo
+    sshrun "deploy$scriptdev/bin/prompt-password '$sname' '$deploy' '$addrend' '$admin_username'"
+    stty echo
+fi
+
+echo
+echo "Unpacking $sname... (this step might take several minutes)"
+
+if [ "$create_dir" = "" ]; then
+  create_dir=0
+fi
+
+if [ "$create_dir" -eq 1 ]; then
+  mkdir -p "$lroot/scripts-$deploy"
+  fs sa "$lroot/scripts-$deploy" system:anyuser none
+  fs sa "$lroot/scripts-$deploy" daemon.scripts write
+  fs sa "$lroot/scripts-$deploy" system:scripts-security-upd write
+fi
+
+origdir=`pwd`
+mkdir -p "$lroot/web_scripts_tmp"
+cd "$lroot/web_scripts_tmp"
+fs sa . system:anyuser none
+fs sa . daemon.scripts write
+fs sa . system:scripts-security-upd write
+mkdir -p "$lroot/web_scripts/$addrend"
+cd "$lroot/web_scripts/$addrend"
+fs sa . system:anyuser none
+fs sa . daemon.scripts write
+fs sa . system:scripts-security-upd write
+athrun scripts gtar zxf "/mit/scripts/deploy$scriptsdev/$deploy.tar.gz"
+files=`athrun scripts gfind . -mindepth 1 -maxdepth 1`
+numfiles=`echo "$files" | wc -l`
+if [ "$numfiles" -eq 1 ]; then
+    athrun scripts gfind . -mindepth 2 -maxdepth 2 | xargs -i mv \{} .
+    rmdir $files
+fi
+if [ -f "/mit/scripts/deploy$scriptsdev/php.ini/$deploy" ]; then
+	sed /SCRIPTS_USER/s//$lname/ /mit/scripts/deploy$scriptsdev/php.ini/$deploy > php.ini
+	athrun scripts gfind . -mindepth 1 -type d -exec sh -c 'ln -sf "`echo "$1" | sed '\''s,[^/],,g; s,/,../,g'\''`php.ini" "$1/"' -- {} \;
+fi
+cd $origdir
+
+sshrun "deploy$scriptsdev/bin/$deploy '$sname' '$deploy' '$addrend' '$admin_username' '$requires_sql' '$scriptsdev' '$USER'"
+rm -f /$lroot/web_scripts/$addrend/.scripts-tmp
+checkfailed
+
+echo
+echo == Installation complete! ==
+echo You should now be able to access your new copy of $sname at
+echo http://scripts.mit.edu/~$lname/$addrend
+echo "(You can replace the http with https if you want to use encryption)"
+echo If you have trouble accessing it, feel free to contact
+echo the scripts.mit.edu team by e-mailing scripts@mit.edu
+exit 0
Index: /locker/deploy/bin/onserver.pm
===================================================================
--- /locker/deploy/bin/onserver.pm	(revision 127)
+++ /locker/deploy/bin/onserver.pm	(revision 127)
@@ -0,0 +1,78 @@
+package onserver;
+use strict;
+use Exporter;
+our @ISA = qw(Exporter);
+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);
+
+our $server = "scripts.mit.edu";
+
+our ($tmp, $USER, $HOME, $sname, $deploy, $addrend, $admin_username, $requires_sql, $addrlast, $sqlhost, $sqluser, $sqlpass, $sqldb, $sqldbcurl, $admin_password, $scriptsdev, $human);
+
+$tmp = ".scripts-tmp";
+sub totmp {
+  open(FILE, ">$tmp");
+  print FILE $_[0];
+  close(FILE);
+}
+
+sub print_login_info {
+  print "\nYou will be able to log in to $sname using the following:\n";
+  print "  username: $admin_username\n";
+  print "  password: $admin_password\n";
+}
+
+sub press_enter {
+  local $/ = "\n";
+  print "Press [enter] to continue with the install.";
+  my $enter = <STDIN>; 
+}
+
+sub setup {
+  $ENV{PATH} = '/bin:/usr/bin';
+  $USER = $ENV{USER};
+  $HOME = $ENV{HOME};
+  
+  ($sname, $deploy, $addrend, $admin_username, $requires_sql, $scriptsdev, $human) = @ARGV;
+  chdir "$HOME/web_scripts/$addrend";
+  
+  if($addrend =~ /^(.*)\/$/) {
+    $addrend = $1;
+  }
+  ($addrlast) = ($addrend =~ /([^\/]*)$/);
+  
+  if($requires_sql) {
+    print "\nCreating SQL database for $sname...\n";
+   
+    my $getpwd=`/mit/scripts/sql/bin$scriptsdev/get-password`;
+    ($sqlhost, $sqluser, $sqlpass) = split(/\s/, $getpwd);
+    
+    $sqldb=`/mit/scripts/sql/bin$scriptsdev/get-next-database "$addrlast"`;
+    $sqldb=`/mit/scripts/sql/bin$scriptsdev/create-database "$sqldb"`;
+    if($sqldb eq "") {
+      print "\nERROR:\n";
+      print "Your SQL account failed to create a SQL database.\n";
+      print "You should log in at http://sql.mit.edu to check whether\n";
+      print "your SQL account is at its database limit or its storage limit.\n";
+      print "If you cannot determine the cause of the problem, please\n";
+      print "feel free to contact sql\@mit.edu for assistance.\n";
+      `touch .failed`;
+      exit 1;
+    }
+    $sqldbcurl = $sqldb;
+    $sqldbcurl =~ s/\+/\%2B/;
+  }
+ 
+  if(-e "$HOME/.sql/.$deploy.admin") { 
+    $admin_password=`cat $HOME/.sql/.$deploy.admin`;
+  }
+  chomp($admin_password);
+  unlink "$HOME/.sql/.$deploy.admin";
+  
+  print "\nConfiguring $sname...\n";
+  
+  `date > .scripts-version`;
+  `stat /mit/scripts/deploy$scriptsdev/$deploy.tar.gz >> .scripts-version`;
+
+  select STDOUT;
+  $| = 1; # STDOUT is *hot*!
+}
Index: /locker/deploy/bin/phpbb
===================================================================
--- /locker/deploy/bin/phpbb	(revision 127)
+++ /locker/deploy/bin/phpbb	(revision 127)
@@ -0,0 +1,11 @@
+#!/usr/bin/perl
+use strict;
+use lib '/mit/scripts/deploy/bin';
+use onserver;
+
+setup();
+
+totmp("-d \"lang=english&dbms=mysql4&upgrade=0&dbhost=$sqlhost&dbuser=$sqluser&dbname=$sqldbcurl&dbpasswd=$sqlpass&prefix=&board_email=$human\@mit.edu&server_name=$server&server_port=80&script_path=/~$USER/$addrend/&admin_name=$admin_username&admin_pass1=$admin_password&admin_pass2=$admin_password&install_step=1&cur_lang=english\"");
+`curl -K $tmp http://$server/~$USER/$addrend/install/install.php 2>/dev/null`;
+
+`rm -rf contrib install`;
Index: /locker/deploy/bin/phpical
===================================================================
--- /locker/deploy/bin/phpical	(revision 127)
+++ /locker/deploy/bin/phpical	(revision 127)
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+use strict;
+use lib '/mit/scripts/deploy/bin';
+use onserver;
+
+setup();
+
+undef $/;
+open(FILE, "contemp.php");
+my $a = <FILE>;
+close(FILE);
+$a =~ s/adminpass/$admin_password/g;
+$a =~ s/\$phpicalendar_publishing/\/\/ WARNING: The scripts.mit.edu maintainers have had to disable this feature on scripts.mit.edu because it contains a serious security vulnerability that has not been addressed by the software\'s authors.  Please do not try to enable this feature\n\$phpicalendar_publishing/;
+open(FILE, ">config.inc.php");
+print FILE $a;
+close(FILE);
+
+#`cp /mit/scripts/deploy/phpical/MIT\ Academic\ Calendar.ics calendars/`;
+
+`rm -f contemp.php`;
+`rm -f calendars/publish.ical.php`;
+
+print <<END;
+Your $sname Admin Panel is at
+http://$server/~$USER/$addrend/admin
+You can use this admin panel to upload calendars for display.
+END
+press_enter();
Index: /locker/deploy/bin/prompt-password
===================================================================
--- /locker/deploy/bin/prompt-password	(revision 127)
+++ /locker/deploy/bin/prompt-password	(revision 127)
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+name=$1
+deploy=$2
+addrend=$3
+admin_username=$4
+cd $HOME/web_scripts/$addrend
+
+echo
+echo You will be able to control your copy of $name by logging in to
+echo $name using username \"$admin_username\".  This account will have a
+echo password of your choice.  You should not use your Athena account password.
+
+done="0"
+while [ "$done" = "0" ]
+do
+  echo "Please decide upon an admin password, type it, and press [enter]."
+  echo "This password may only contain a-z, A-Z, and 0-9."
+  printf "As you type your password, the cursor will not move: "
+  read admin_pass1
+  echo
+  echo
+  echo "Now please type the same password again and press [enter]."
+  printf "As you type your password, the cursor will not move: "
+  read admin_pass2
+  echo
+
+  if [ "$admin_pass1" = "$admin_pass2" ]; then
+    done="1"
+  else
+    echo
+    echo == Sorry, those passwords do not match.  Please try again. ==
+  fi
+done
+
+echo
+echo OK.  Continuing with the install...
+echo "$admin_pass1" > $HOME/.sql/.$deploy.admin
Index: /locker/deploy/bin/scripts-chipmunkpoll
===================================================================
--- /locker/deploy/bin/scripts-chipmunkpoll	(revision 127)
+++ /locker/deploy/bin/scripts-chipmunkpoll	(revision 127)
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+sname="Chipmunk Poll"
+deploy="chipmunkpoll"
+prompt_username=1
+. /mit/scripts/deploy/bin$scriptsdev/install-onathena
Index: /locker/deploy/bin/scripts-exponent
===================================================================
--- /locker/deploy/bin/scripts-exponent	(revision 127)
+++ /locker/deploy/bin/scripts-exponent	(revision 127)
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+sname="Exponent"
+deploy="exponent"
+prompt_username=1
+. /mit/scripts/deploy/bin$scriptsdev/install-onathena
Index: /locker/deploy/bin/wordpress
===================================================================
--- /locker/deploy/bin/wordpress	(revision 127)
+++ /locker/deploy/bin/wordpress	(revision 127)
@@ -0,0 +1,15 @@
+#!/usr/bin/perl
+use strict;
+use lib '/mit/scripts/deploy/bin';
+use onserver;
+
+setup();
+
+totmp("-d \"dbhost=$sqlhost&uname=$sqluser&dbname=$sqldbcurl&pwd=$sqlpass&prefix=&submit=Submit&step=2\"");
+`curl -K $tmp http://$server/~$USER/$addrend/wp-admin/setup-config.php?step=2 2>/dev/null`;
+
+$admin_password=`curl -d "weblog_title=My+Blog&admin_email=$human\@mit.edu&submit=Continue&step=2" http://$server/~$USER/$addrend/wp-admin/install.php?step=2 2>/dev/null | grep '<dd><code>' | tail -n1 | cut -d\\> -f3 | cut -d\\< -f1`;
+
+print_login_info();
+print "You will also receive this login information at your MIT email address.\n";
+press_enter();
