[apache2] 02/06: Removed /usr/share/doc/apache2/migrate-sites.pl

Jean-Michel Vourgère nirgal at moszumanska.debian.org
Sun Jun 7 22:48:00 UTC 2015


This is an automated email from the git hooks/post-receive script.

nirgal pushed a commit to branch master
in repository apache2.

commit 88387f9a13fe5d982146bb6babb79a4558faa3d3
Author: Jean-Michel Vourgère <nirgal at debian.org>
Date:   Sun Jun 7 23:31:28 2015 +0200

    Removed /usr/share/doc/apache2/migrate-sites.pl
    
    This was useless after Jessie.
---
 debian/apache2.docs     |  1 -
 debian/migrate-sites.pl | 62 -------------------------------------------------
 2 files changed, 63 deletions(-)

diff --git a/debian/apache2.docs b/debian/apache2.docs
index 5000c3b..6de9747 100644
--- a/debian/apache2.docs
+++ b/debian/apache2.docs
@@ -1,4 +1,3 @@
 debian/README.backtrace
 debian/README.multiple-instances
 debian/PACKAGING
-debian/migrate-sites.pl
diff --git a/debian/migrate-sites.pl b/debian/migrate-sites.pl
deleted file mode 100644
index 8296844..0000000
--- a/debian/migrate-sites.pl
+++ /dev/null
@@ -1,62 +0,0 @@
-#! /usr/bin/perl
-
-#
-# Rename existing sites in $SITES_AVAILABLE to make sure they have a
-# .conf suffix. update symlinks in $SITES_ENABLED if necessary
-#
-# Warning: This script does not work if you didn't use a2ensite/a2dissite to
-# manage your sites
-#
-
-use strict;
-use File::Copy;
-use File::Spec;
-use File::Basename;
-
-my $SITES_AVAILABLE = "/etc/apache2/sites-available";
-my $SITES_ENABLED = "/etc/apache2/sites-enabled";
-
-my %SITES = (
-	"$SITES_AVAILABLE" => [],
-	"$SITES_ENABLED" => []
-);
-
-sub error
-{
-	my $reason = shift;
-	print STDERR "$reason\n";
-	exit 1;
-}
-
-foreach my $key (keys %SITES)
-{
-	error("No such directory: $key") unless -d $key;
-
-	opendir(DIR, $key) || error("$key: $!");
-	push $SITES{$key}, grep { m#^[^\.]# && $_ !~ m/default|default-ssl/ && $_ !~ m#\.conf$# } readdir(DIR);
-	closedir(DIR);
-}
-
-foreach my $site (@{ $SITES{$SITES_AVAILABLE} })
-{
-		print("rename $site -> $site.conf\n");
-		my $curname = $SITES_AVAILABLE . "/" . $site;
-		my $newname = $curname . ".conf";
-		my $curlink = $SITES_ENABLED . "/" . $site;
-		my $newlink = $curlink . ".conf";
-
-		if (-e $curname)
-		{
-			move($curname, $newname) || error("Could not rename file $curname: $!");
-			if ( grep { $_ eq $site && -l $SITES_ENABLED . "/" . $_ } @{ $SITES{$SITES_ENABLED} } )
-			{
-				print("re-enable site: $site as $site.conf\n");
-				symlink( File::Spec->abs2rel( $newname,	dirname($newlink)), $newlink ) || error("Could not create link $newlink: $1");
-				if ( -l $curlink )
-				{
-					unlink($curlink)
-				}
-			}
-		}
-}
-

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-apache/apache2.git



More information about the Pkg-apache-commits mailing list