summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@piny.svcs.cs.pdx.edu>2009-09-12 03:27:30 -0700
committerroot <root@piny.svcs.cs.pdx.edu>2009-09-12 03:27:30 -0700
commit201b6018423ea06bc0f2ea460ca48f78171e4f69 (patch)
treed416cf6c87e1b8f0d4eb0b55deac0590c0f71eb3
parentecb4331bd0d0f062da650f1dc65f33974b8391a4 (diff)
downloadpiny-code-201b6018423ea06bc0f2ea460ca48f78171e4f69.tar.gz
piny-code-201b6018423ea06bc0f2ea460ca48f78171e4f69.zip
Changing all piny.svcs.cs.pdx.edu urls and paths to piny.be.
-rw-r--r--etc/apache2/sites-available/001-piny37
-rwxr-xr-xusr/local/sbin/newrepo32
-rwxr-xr-xusr/local/sbin/rmrepo4
3 files changed, 40 insertions, 33 deletions
diff --git a/etc/apache2/sites-available/001-piny b/etc/apache2/sites-available/001-piny
index 5e29fe0..6e5c3fd 100644
--- a/etc/apache2/sites-available/001-piny
+++ b/etc/apache2/sites-available/001-piny
@@ -1,46 +1,47 @@
<VirtualHost *:80>
- ServerName piny.svcs.cs.pdx.edu
+ ServerName piny.be
- DocumentRoot /srv/www/piny.svcs.cs.pdx.edu
+ DocumentRoot /srv/www/piny.be
<Directory />
Options Indexes FollowSymLinks MultiViews
AllowOverride None
</Directory>
- RedirectMatch 301 ^/$ http://piny.svcs.cs.pdx.edu/piny-web/
+ RedirectMatch 301 ^/$ http://piny.be/piny-web/
</VirtualHost>
<VirtualHost *:80>
- ServerName secure.piny.svcs.cs.pdx.edu
- RedirectMatch 301 (.*) https://secure.piny.svcs.cs.pdx.edu$1
+ ServerName www.piny.be
+ RedirectMatch 301 (.*) http://piny.be$1
</VirtualHost>
<VirtualHost *:443>
- ServerName secure.piny.svcs.cs.pdx.edu
- DocumentRoot /srv/www/secure.piny.svcs.cs.pdx.edu
+ ServerName piny.be
+ DocumentRoot /srv/www/piny.be
<Directory />
Options Indexes FollowSymLinks MultiViews
AllowOverride None
</Directory>
- RedirectMatch 301 ^/$ http://piny.svcs.cs.pdx.edu/piny-web/
+ RedirectMatch 301 ^/$ http://piny.be/piny-web/
SSLEngine On
- SSLCertificateFile /etc/ssl/private/wildcard.piny.svcs.cs.pdx.edu.pem
+ SSLCertificateFile /etc/ssl/private/secure.piny.be.pem
+ SSLCACertificateFile /etc/ssl/private/GandiStandardSSLCA.pem
</VirtualHost>
<VirtualHost *:80>
- ServerName cgi.piny.svcs.cs.pdx.edu
- RedirectMatch 301 (.*) https://cgi.piny.svcs.cs.pdx.edu$1
+ ServerName secure.piny.be
+ RedirectMatch 301 (.*) https://secure.piny.be$1
</VirtualHost>
<VirtualHost *:443>
- ServerName cgi.piny.svcs.cs.pdx.edu
- DocumentRoot /srv/www/cgi.piny.svcs.cs.pdx.edu
+ ServerName secure.piny.be
+ DocumentRoot /srv/www/secure.piny.be
- <Directory "/srv/www/cgi.piny.svcs.cs.pdx.edu">
+ <Directory "/srv/www/secure.piny.be">
SSLRequireSSL
SetHandler cgi-script
AllowOverride None
@@ -52,5 +53,11 @@
Include /etc/apache2/piny-enabled
SSLEngine On
- SSLCertificateFile /etc/ssl/private/wildcard.piny.svcs.cs.pdx.edu.pem
+ SSLCertificateFile /etc/ssl/private/secure.piny.be.pem
+ SSLCACertificateFile /etc/ssl/private/GandiStandardSSLCA.pem
+</VirtualHost>
+
+<VirtualHost *:80>
+ ServerName piny.svcs.cs.pdx.edu
+ RedirectMatch 301 (.*) http://piny.be$1
</VirtualHost>
diff --git a/usr/local/sbin/newrepo b/usr/local/sbin/newrepo
index 2ad8ada..2805a1e 100755
--- a/usr/local/sbin/newrepo
+++ b/usr/local/sbin/newrepo
@@ -3,7 +3,7 @@
use strict;
use warnings;
-my( $errorto ) = 'jrayhawk+piny.svcs.cs.pdx.edu@omgwallhack.org'; # Email address to send horrible errors to.
+my( $errorto ) = 'jrayhawk+piny.be@omgwallhack.org'; # Email address to send horrible errors to.
my( $reponame, $email, @errors, $wikilisttempfile, $cgitrctempfile, $description );
if ( ( ! scalar $ARGV[0] ) or ( scalar $ARGV[1] ) or ( $ARGV[0] !~ /^[a-z0-9][a-z0-9+.-]+$/ ) ) {
@@ -31,8 +31,8 @@ while(<GROUP>) {
close(GROUP);
if( -d "/srv/git/$reponame.git" ) { push( @errors, "/srv/git/$reponame.git already exists!\n"); };
if( -d "/srv/ikiwiki/$reponame" ) { push( @errors, "/srv/ikiwiki/$reponame already exists!\n"); };
-if( -d "/srv/www/piny.svcs.cs.pdx.edu/$reponame" ) { push( @errors, "/srv/www/piny.svcs.cs.pdx.edu/$reponame already exists!\n"); };
-if( -d "/srv/www/cgi.piny.svcs.cs.pdx.edu/repos/$reponame" ) { push( @errors, "/srv/www/cgi.piny.svcs.cs.pdx.edu/repos/$reponame already exists!\n"); };
+if( -d "/srv/www/piny.be/$reponame" ) { push( @errors, "/srv/www/piny.svcs.cs.pdx.edu/$reponame already exists!\n"); };
+if( -d "/srv/www/secure.piny.be/repos/$reponame" ) { push( @errors, "/srv/www/cgi.piny.be/repos/$reponame already exists!\n"); };
if( -f "/etc/ikiwiki/piny/$reponame.setup" ) { push( @errors, "/etc/ikiwiki/piny/$reponame.setup already exists!\n"); };
if( -f "/etc/ikiwiki/wikilist.d/$reponame" ) { push( @errors, "/etc/ikiwiki/wikilist.d/$reponame already exists!\n"); };
if( -f "/etc/apache2/piny-available/$reponame" ) { push( @errors, "/etc/apache2/piny-available/$reponame already exists!\n"); };
@@ -44,7 +44,7 @@ if( @errors ) {
} else { # IT'S ARMAGEDDON
open ( MAIL, "|/usr/lib/sendmail -t" );
print( MAIL "To: $errorto\n" );
- print( MAIL "From: newrepo\@piny.svcs.cs.pdx.edu\n" );
+ print( MAIL "From: newrepo\@piny.be\n" );
print( MAIL "Subject: Piny error: $ENV{SUDO_USER} found inconsistent $reponame in the creation process!\n" );
print( MAIL "MIME-Version: 1.0\n" );
print( MAIL "Content-Type: text/plain; charset=us-ascii\n" );
@@ -105,11 +105,11 @@ use IkiWiki::Setup::Standard {
wikiname => \'' . $reponame . '\', # PINY
adminemail => \'' . $email . '\', # PINY
srcdir => \'/srv/ikiwiki/' . $reponame . '\', # PINY
- destdir => \'/srv/www/piny.svcs.cs.pdx.edu/' . $reponame . '\', # PINY
- url => \'http://piny.svcs.cs.pdx.edu/' . $reponame . '\', # PINY
- cgiurl => \'https://cgi.piny.svcs.cs.pdx.edu/repos/' . $reponame . '/ikiwiki.cgi\', # PINY
- historyurl => \'https://cgi.piny.svcs.cs.pdx.edu/cgit/' . $reponame . '/log/[[file]]\', # PINY
- diffurl => \'https://cgi.piny.svcs.cs.pdx.edu/cgit/' . $reponame . '/diff/?id=[[sha1_commit]]\', # PINY
+ destdir => \'/srv/www/piny.be/' . $reponame . '\', # PINY
+ url => \'http://piny.be/' . $reponame . '\', # PINY
+ cgiurl => \'https://secure.piny.be/repos/' . $reponame . '/ikiwiki.cgi\', # PINY
+ historyurl => \'https://secure.piny.be/cgit/' . $reponame . '/log/[[file]]\', # PINY
+ diffurl => \'https://secure.piny.be/cgit/' . $reponame . '/diff/?id=[[sha1_commit]]\', # PINY
templatedir => "/srv/templates",
underlaydir => "/etc/ikiwiki/share/underlay",
@@ -121,7 +121,7 @@ use IkiWiki::Setup::Standard {
wrappers => [
{
cgi => 1,
- wrapper => \'/srv/www/cgi.piny.svcs.cs.pdx.edu/repos/' . $reponame . '/ikiwiki.cgi\', # PINY
+ wrapper => \'/srv/www/secure.piny.be/repos/' . $reponame . '/ikiwiki.cgi\', # PINY
wrappermode => "06755",
wrappergroup => \'git-' . $reponame . '\', # PINY
},
@@ -192,7 +192,7 @@ close( WIKILIST );
# WRITE APACHE CONFIG
open ( APACHE, ">/etc/apache2/piny-available/$reponame" );
-print( APACHE '<Directory /srv/www/cgi.piny.svcs.cs.pdx.edu/repos/' . $reponame . '>
+print( APACHE '<Directory /srv/www/secure.piny.be/repos/' . $reponame . '>
AuthPAM_Enabled on
AuthGROUP_Enabled on
AuthPAM_FallThrough off
@@ -208,9 +208,9 @@ system( '/etc/init.d/apache2 reload | grep -v "Reloading web server config: apac
# CREATE IKIWIKI WORKING DIR
system( "/usr/bin/git clone --quiet /srv/git/$reponame /srv/ikiwiki/$reponame" );
-mkdir( "/srv/www/piny.svcs.cs.pdx.edu/$reponame" );
-mkdir( "/srv/www/cgi.piny.svcs.cs.pdx.edu/repos/$reponame" );
-system( "/bin/chown -R ikiwiki-$reponame /srv/ikiwiki/$reponame /srv/www/piny.svcs.cs.pdx.edu/$reponame /srv/www/cgi.piny.svcs.cs.pdx.edu/repos/$reponame" );
+mkdir( "/srv/www/piny.be/$reponame" );
+mkdir( "/srv/www/secure.piny.be/repos/$reponame" );
+system( "/bin/chown -R ikiwiki-$reponame /srv/ikiwiki/$reponame /srv/www/piny.be/$reponame /srv/www/secure.piny.be/repos/$reponame" );
open ( WIKILIST, ">/etc/ikiwiki/wikilist.d/$reponame" ); # Maybe someday ikiwiki will support wikilist.d.
print( WIKILIST "ikiwiki-$reponame /etc/ikiwiki/piny/$reponame.setup\n" ); # In the meantime, we fake it.
@@ -239,5 +239,5 @@ system( "/bin/mv $cgitrctempfile /etc/cgitrepos" ); # This is marginally racy, b
# COMPILE
system( "/usr/bin/sudo -u ikiwiki-$reponame /usr/bin/ikiwiki --setup /etc/ikiwiki/piny/$reponame.setup | grep -v 'successfully generated'" );
-print( "Web interface: http://piny.svcs.cs.pdx.edu/$reponame/\n" );
-print( "Repo information: https://cgi.piny.svcs.cs.pdx.edu/cgit/$reponame/\n" );
+print( "Web interface: http://piny.be/$reponame/\n" );
+print( "Repo information: https://secure.piny.be/cgit/$reponame/\n" );
diff --git a/usr/local/sbin/rmrepo b/usr/local/sbin/rmrepo
index 7c838ac..5c67339 100755
--- a/usr/local/sbin/rmrepo
+++ b/usr/local/sbin/rmrepo
@@ -47,8 +47,8 @@ chmod ( 0644, $cgitrctempfile );
system( "/bin/cat /etc/cgitrc.d/* > $cgitrctempfile" );
system( "/bin/mv $cgitrctempfile /etc/cgitrepos" ); # This is marginally racy, but the consequences are probably ignorable.
-system( "/bin/rm -r /srv/www/piny.svcs.cs.pdx.edu/$reponame" );
-system( "/bin/rm -r /srv/www/cgi.piny.svcs.cs.pdx.edu/repos/$reponame" );
+system( "/bin/rm -r /srv/www/piny.be/$reponame" );
+system( "/bin/rm -r /srv/www/secure.piny.be/repos/$reponame" );
unlink( "/etc/ikiwiki/piny/$reponame.setup" );
system( "/bin/rm -r /srv/ikiwiki/$reponame" );