53
53
LocalAddr => undef ,
54
54
LocalPort => 60834,
55
55
);
56
- if ($osname eq " darwin" || $osname eq " freebsd " ) {
56
+ if ($osname eq " darwin" ) {
57
57
$serverProperties {ReusePort } = 1;
58
58
}
59
59
@@ -1068,14 +1068,10 @@ sub www_setup {
1068
1068
1069
1069
# apache stuff
1070
1070
if ($cgi -> param(" step" ) eq " apache" ) {
1071
- if ($host -> getOsName ne " windows" && !(getpwnam $collected -> {wreUser })) {
1072
- $out .= qq| <p class="status">There is no user $collected ->{wreUser} on this system, please create it or go
1073
- back and change the user you'd like to run the WRE under.</p>| ;
1074
- }
1075
1071
my $nginx = $config -> get(" nginx" );
1076
1072
$out .= ' <h1>Apache</h1>
1077
1073
<form action="/setup" method="post">
1078
- <input type="hidden" name="step" value="mysql ">
1074
+ <input type="hidden" name="step" value="webgui ">
1079
1075
<input type="hidden" name="collected" value="' .$collectedJson .' " />
1080
1076
<p>
1081
1077
nginx Port <br />
@@ -1091,42 +1087,6 @@ sub www_setup {
1091
1087
' ;
1092
1088
}
1093
1089
1094
- # mysql stuff
1095
- elsif ($cgi -> param(" step" ) eq " mysql" ) {
1096
- if (-f " /etc/my.cnf" ) {
1097
- $out .= q| <p class="status">There is a file at /etc/my.cnf that you must move or it will interfere with the WRE.</p>| ;
1098
- }
1099
- if (-f " /my.ini" ) {
1100
- $out .= q| <p class="status">There is a file at /my.ini that you must move or it will interfere with the WRE.</p>| ;
1101
- }
1102
- my $mysql = $config -> get(" mysql" );
1103
- $out .= ' <h1>MySQL</h1>
1104
- <form action="/setup" method="post">
1105
- <input type="hidden" name="step" value="webgui">
1106
- <input type="hidden" name="collected" value="' .$collectedJson .' " />
1107
- <p>
1108
- Host <br />
1109
- <input type="text" name="mysqlHost" value="' .($collected -> {mysqlHost } || $mysql -> {hostname }).' " />
1110
- </p>
1111
- <p>
1112
- Port <br />
1113
- <input type="text" name="mysqlPort" value="' .($collected -> {mysqlPort } || $mysql -> {port }).' " />
1114
- </p>
1115
- <p>
1116
- Admin User <br />
1117
- <input type="text" name="mysqlAdminUser" value="' .($collected -> {mysqlAdminUser } || $mysql -> {adminUser }).' " />
1118
- </p>
1119
- <p>
1120
- Admin Password <br />
1121
- <input type="text" name="mysqlAdminPassword" value="' .($collected -> {mysqlAdminPassword } || " 123qwe" ).' " />
1122
- </p>
1123
- <input type="button" class="deleteButton" value="« Previous"
1124
- onclick="this.form.step.value=\' apache\' ;this.form.submit();" />
1125
- <input type="submit" class="saveButton" value="Next »" />
1126
- </form>
1127
- ' ;
1128
- }
1129
-
1130
1090
# webgui stuff
1131
1091
elsif ($cgi -> param(" step" ) eq " webgui" ) {
1132
1092
$out .= ' <h1>WebGUI</h1>
@@ -1229,21 +1189,10 @@ sub www_setup {
1229
1189
print $socket " <p>Creating default databases</p>" ;
1230
1190
$file -> makePath($config -> getRoot(" /var/mysqldata" ));
1231
1191
chdir ($config -> getRoot(" /prereqs" ));
1232
- if ($host -> getOsName eq " windows" ) {
1233
- $file -> copy($config -> getRoot(" /var/setupfiles/my.cnf" ),
1234
- $config -> getRoot(" /etc/my.ini" ),
1235
- { force => 1, templateVars => {osName => $host -> getOsName} });
1236
- $file -> copy($config -> getRoot(" /prereqs/data/" ),
1237
- $config -> getRoot(" /var/mysqldata/" ),
1238
- { force => 1, recursive => 1 });
1239
- system ($config -> getRoot(" /sbin/services/windows/mysql-install.bat" ));
1240
- }
1241
- else {
1242
1192
$file -> copy($config -> getRoot(" /var/setupfiles/my.cnf" ),
1243
1193
$config -> getRoot(" /etc/my.cnf" ),
1244
1194
{ force => 1, processTemplate => 1 });
1245
1195
system (file(" bin/mysql_install_db" )-> stringify." --user=" .$collected -> {wreUser }." --port=" . $collected -> {mysqlPort });
1246
- }
1247
1196
print $socket " <p>Starting MySQL</p>" ;
1248
1197
$mysql -> start;
1249
1198
print $socket " <p>Connecting</p>" ;
@@ -1338,12 +1287,9 @@ sub www_setup {
1338
1287
1339
1288
print $socket " <p>Extracting WebGUI. Please be patient, this can take a while.</p>$crlf " ;
1340
1289
eval { $update -> extractArchive($download ) };
1341
- if ($@ && $host -> getOsName ne " windows " ) {
1290
+ if ($@ ) {
1342
1291
print $socket " <p>Had some errors extracting WebGUI. $@ </p>$crlf " ;
1343
1292
}
1344
- elsif ($@ && $host -> getOsName eq " windows" ) {
1345
- print STDERR " \n NOTICE:\n You can safely ignore all the tar extraction errors above. They\n are do to the differences between *nix and Windows file systems.\n " ;
1346
- }
1347
1293
}
1348
1294
eval {
1349
1295
open my $in , ' <' , $config -> getWebguiRoot(" /etc/log.conf.original" )
0 commit comments