[otrs-cvs] otrs4win/Scripts ConfigureMySQL.pl,1.7,1.8
"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-serv4564/Scripts
Modified Files:
ConfigureMySQL.pl
Log Message:
No longer configure batch files.
Author: mb
Index: ConfigureMySQL.pl
===================================================================
RCS file: /home/cvs/otrs4win/Scripts/ConfigureMySQL.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -2 -u -d -r1.7 -r1.8
--- ConfigureMySQL.pl 20 Nov 2012 19:18:27 -0000 1.7
+++ ConfigureMySQL.pl 8 Feb 2013 16:03:52 -0000 1.8
@@ -2,5 +2,5 @@
# --
# ConfigureMySQL.pl - script to configure MySQL
-# 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 "ConfigureMySQL.pl <Revision $VERSION> - script to configure MySQL\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: ConfigureMySQL.pl -d <install directory>\n\n";
exit 1;
@@ -75,10 +75,4 @@
PrepareMyIni();
-# config the OTRS server start and restart scripts
-ConfigOTRSServiceStart();
-
-# config the OTRS server stop and restart scripts
-ConfigOTRSServiceStop();
-
1;
@@ -149,101 +143,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 MySQL service
-NET START MySQL";
-
- # add the mysql start part
- $NewString =~ s{ ^ REM \s ---MySQLStartPart--- }{$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 ---MySQLStartPart---' 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 MySQL service
-NET STOP MySQL";
-
- # add the mysql stop part
- $NewString =~ s{ ^ REM \s ---MySQLStopPart--- }{$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 ---MySQLStopPart---' 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