[otrs-cvs] otrs4win/Scripts ConfigureOTRS.pl,1.12,1.13
"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-serv4667/Scripts
Modified Files:
ConfigureOTRS.pl
Log Message:
No longer configure batch files, remove shebang replacement which is not needed on mod_perl or perlex.
Author: mb
Index: ConfigureOTRS.pl
===================================================================
RCS file: /home/cvs/otrs4win/Scripts/ConfigureOTRS.pl,v
retrieving revision 1.12
retrieving revision 1.13
diff -2 -u -d -r1.12 -r1.13
--- ConfigureOTRS.pl 20 Nov 2012 19:18:30 -0000 1.12
+++ ConfigureOTRS.pl 8 Feb 2013 16:04:25 -0000 1.13
@@ -2,5 +2,5 @@
# --
# ConfigureOTRS.pl - script to configure OTRS
-# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
# --
# $Id$
@@ -42,5 +42,5 @@
if ( $Opts{'h'} ) {
print STDOUT "ConfigureOTRS.pl <Revision $VERSION> - script to configure OTRS\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: ConfigureOTRS.pl -d <install directory>\n\n";
exit 1;
@@ -84,15 +84,4 @@
ConfigCron4Win32Pl();
-# Configure the OTRS Scheduler service, only if it's present (OTRS 3.1 and up)
-
-if ( -e "$OTRSDirQuoted/bin/otrs.Scheduler4win.pl" ) {
-
- # config the OTRS server start and restart scripts
- ConfigOTRSServiceStart();
-
- # config the OTRS server stop and restart scripts
- ConfigOTRSServiceStop();
-}
-
1;
@@ -129,55 +118,4 @@
}
-sub ReplaceShebangLine {
-
- # get filename
-
- my $File = $File::Find::name;
-
- # return if file is not a .pl file
- return if $File !~ m{ .+ \.pl \z }xms;
-
- # check if file exists
- return if !-e $File;
-
- # check if file is a directory
- return if -d $File;
-
- # check if file is writeable
- return if !-w $File;
-
- # check if file is a link
- return if -l $File;
-
- # check if file is a text file
- return if !-T $File;
-
- # read file
- return if !open my $FH1, '<', $File;
- my $OrgString = do { local $/; <$FH1> };
- close $FH1;
-
- # copy the string
- my $NewString = $OrgString;
-
- # create path to perl
- my $PerlQuoted = $InstallDirQuoted . '/StrawberryPerl/perl/bin/perl.exe';
-
- # find and replace all #!/usr/bin/perl
- $NewString =~ s{ ^ \#\!\/usr\/bin\/perl }{#!$PerlQuoted}xms;
-
- # next file if no changes
- return 1 if $OrgString eq $NewString;
-
- # write new file
- return if !open my $FH2, '>', $File;
- print $FH2 $NewString;
- close $FH2;
-
- print STDERR "Replaced string #!/usr/bin/perl in $File\n";
-
- return 1;
-}
-
sub ReplaceOTRSDir {
@@ -324,101 +262,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 OTRS Scheduler service
-\"$InstallDirQuoted/StrawberryPerl/perl/bin/perl.exe\" \"$InstallDirQuoted/OTRS/bin/otrs.Scheduler4win.pl\" -a start";
-
- # add the OTRS Scheduler start part
- $NewString =~ s{ ^ REM \s ---OTRSSchedulerStartPart--- }{$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 ---OTRSSchedulerStartPart---' 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 OTRS Scheduler service
-\"$InstallDirQuoted/StrawberryPerl/perl/bin/perl.exe\" \"$InstallDirQuoted/OTRS/bin/otrs.Scheduler4win.pl\" -a stop";
-
- # add the OTRS Scheduler stop part
- $NewString =~ s{ ^ REM \s ---OTRSSchedulerStopPart--- }{$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 ---OTRSSchedulerStopPart---' 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