[otrs-cvs] otrs4win/Scripts ConfigureApache.pl,1.10,1.11

"CVS commits notifications of OTRS.org" <[email protected]>
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/otrs4win/Scripts
In directory lancelot:/tmp/cvs-serv3543/Scripts

Modified Files:
	ConfigureApache.pl 
Log Message:
No longer configure batch files, enable mod_headers and mod_deflate.

Author: mb

Index: ConfigureApache.pl
===================================================================
RCS file: /home/cvs/otrs4win/Scripts/ConfigureApache.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -2 -u -d -r1.10 -r1.11
--- ConfigureApache.pl	20 Nov 2012 19:18:21 -0000	1.10
+++ ConfigureApache.pl	8 Feb 2013 16:01:17 -0000	1.11
@@ -1,6 +1,6 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 # --
 # ConfigureApache.pl - script to configure the apache server
-# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
 # --
 # $Id$
@@ -27,4 +27,5 @@
 use Getopt::Std;
 use File::Find;
+use File::Spec;
 
 use vars qw($VERSION);
@@ -41,5 +42,5 @@
 if ( $Opts{'h'} ) {
     print STDOUT "ConfigureApache.pl <Revision $VERSION> - script to configure the apache\n";
-    print STDOUT "Copyright (C) 2001-2012 OTRS AG, http://otrs.org/\n";
+    print STDOUT "Copyright (C) 2001-2013 OTRS AG, http://otrs.org/\n";
     print STDOUT "usage: ConfigureApache.pl -d <install directory>\n\n";
     exit 1;
@@ -54,5 +55,5 @@
 
 # check the apache directory
-my $ApacheDir = $InstallDir . '\Apache';
+my $ApacheDir = File::Spec->catdir( $InstallDir, 'Apache' );
 if ( !-e $ApacheDir || !-d $ApacheDir ) {
     print STDERR "Invalid apache directory!\n\n";
@@ -74,10 +75,4 @@
 OTRSApacheConfigAdd();
 
-# config the OTRS server start and restart scripts
-ConfigOTRSServiceStart();
-
-# config the OTRS server stop and restart scripts
-ConfigOTRSServiceStop();
-
 1;
 
@@ -145,5 +140,8 @@
 # ---
 
-# load mod_perl
+# load modules for OTRS
+LoadModule deflate_module modules/mod_deflate.so
+LoadModule headers_module modules/mod_headers.so
+
 LoadFile '$InstallDirQuoted/StrawberryPerl/perl/bin/perl512.dll'
 LoadModule perl_module modules/mod_perl.so
@@ -168,101 +166,3 @@
 }
 
-sub ConfigOTRSServiceStart {
-
-    FILE:
-    for my $FileName (qw(OTRSServicesStart.bat OTRSServicesRestart.bat)) {
-
-        # add install directory
-        my $File = $InstallDirQuoted . '/otrs4win/Scripts/' . $FileName;
-
-        # check if file exists
-        next FILE if !-e $File;
-
-        # check if file is a directory
-        next FILE if -d $File;
-
-        # check if file is writeable
-        next FILE if !-w $File;
-
-        # check if file is a link
-        next FILE if -l $File;
-
-        # check if file is a text file
-        next FILE if !-T $File;
-
-        # read file
-        next FILE if !open my $FH1, '<', $File;
-        my $OrgString = do { local $/; <$FH1> };
-        close $FH1;
-
-        # copy the string
-        my $NewString = $OrgString;
-
-        my $StartConfig = "REM Start Apache service
-\"$ApacheDir\\bin\\httpd.exe\" -k start";
-
-        # add the apache start part
-        $NewString =~ s{ ^ REM \s ---ApacheStartPart--- }{$StartConfig}xmsg;
-
-        # next file if no changes
-        next FILE if $OrgString eq $NewString;
-
-        # write new file
-        return if !open my $FH2, '>', $File;
-        print $FH2 $NewString;
-        close $FH2;
-
-        print STDERR "Replaced string 'REM ---ApacheStartPart---' in $File\n";
-    }
-}
-
-sub ConfigOTRSServiceStop {
-
-    FILE:
-    for my $FileName (qw(OTRSServicesStop.bat OTRSServicesRestart.bat)) {
-
-        # add install directory
-        my $File = $InstallDirQuoted . '/otrs4win/Scripts/' . $FileName;
-
-        # check if file exists
-        next FILE if !-e $File;
-
-        # check if file is a directory
-        next FILE if -d $File;
-
-        # check if file is writeable
-        next FILE if !-w $File;
-
-        # check if file is a link
-        next FILE if -l $File;
-
-        # check if file is a text file
-        next FILE if !-T $File;
-
-        # read file
-        next FILE if !open my $FH1, '<', $File;
-        my $OrgString = do { local $/; <$FH1> };
-        close $FH1;
-
-        # copy the string
-        my $NewString = $OrgString;
-
-        my $StopConfig = "REM Stop Apache service
-\"$ApacheDir\\bin\\httpd.exe\" -k stop";
-
-        # add the apache stop part
-        $NewString =~ s{ ^ REM \s ---ApacheStopPart--- }{$StopConfig}xmsg;
-
-        # next file if no changes
-        next FILE if $OrgString eq $NewString;
-
-        # write new file
-        return if !open my $FH2, '>', $File;
-        print $FH2 $NewString;
-        close $FH2;
-
-        print STDERR "Replaced string 'REM ---ApacheStopPart---' in $File\n";
-    }
-}
-
 exit 0;
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.